# Need help with formula

Home Forums Discussion Need help with formula

Viewing 4 posts - 1 through 4 (of 4 total)
• Author
Posts
Carl Haley
Guest

Software version Project 2016

I need my formula to do a comparison of four fields excluding 0, and input the lowest value in a new column.
Field 1: 1 or 0; Field 2: 2 or 0, Field 3: 3 or 0; Field 4: 4 or 0

Here is my custom field formula, but it is returning a value of -1
IIf([Number18]=1,”1″,”4″) Or IIf([Number2]=2,”2″,”4″) Or IIf([Number2]=2,”2″,”4″) Or IIf([Number2]=2,”2″,”4″)

My name is Carl and I can be reached at 214-695-7338

Participant

Hi Carl, It was nice speaking to you. It helped to have clarity on your requirement. Please use this formula for Number5 instead – IIf(Number4=4,4,IIf(Number3=3,3,IIf(Number2=2,2,IIf(Number1=1,1)))). Please note Number4 refers to the fourth field, and so on, and so change the field names accordingly. I tested this formula with different combination so that the highest value between Number1 to Number4 is selected in Number5 field – Here is a screenshot for that https://photos.app.goo.gl/AmTUP4uSvEjzgz6p8

Participant

Hi Carl, since you want the lowest of the four fields use this formula IIf(Number1=1,1,IIf(Number2=2,2,IIf(Number3=3,3,IIf(Number4=4,4))))

Here is the screenshot – https://photos.app.goo.gl/3cNykRPUMZ2D1X9M6