Jul 12, 2019 11:26 AM
Hi again,
Trying to write an IF statement for a cost catagory.
This is what I have now.
{12" GH} * 25.0
BUT I would like it to say:
IF ({12" GH} is a multiple of 4, * 125, (Roundup ({12" GH}) * 25)))
If the field is NOT a multiple of 4, I’d like it to round UP the field to the nearest whole integer.
How would I write that?
Thank you!
Jul 12, 2019 01:32 PM
Hi @Lisa_H - try this:
IF(MOD({12" GH}, 4) = 0, {12" GH} * 0.25, ROUNDUP({12" GH}, 0) * 0.25)
But looking at the results of this, it seems to me the “multiple of 4” is redundant, you get the same results with just:
ROUNDUP({12" GH}, 0) * 0.25
Have I understood the problem correctly?
JB
Jul 12, 2019 01:35 PM
I’m not sure… The 12" GH column will be Total number of Linear feet of job. And each panel is 4’ long. So I need the Roundup column to round it up . So say there is 25’ in the 12" column. I need 7 to appear in the Round up column for it to work.
Jul 12, 2019 01:38 PM
this is what I have now – The how many to order shows 13… BUT its calculating by the hidden 12.5 instead of 13 * 125
Jul 12, 2019 01:41 PM
Ah OK, think you need this:
ROUNDUP({12" GH}/4, 0)
Jul 12, 2019 01:44 PM
So I need 4 columns to get it done? I was actually hoping for 3… ? no way to get it to round up to the next integer instead of .88?
Jul 12, 2019 01:45 PM
You don’t need the “Div/4” and “Roundup Div/4” columns - these were just for illustration. The formula column is the formula shown above, which encapsulates it all.
Jul 12, 2019 01:47 PM
So you should end up with this:
Jul 12, 2019 01:48 PM
OHHH ok Gotcha!! I was trying to /4 after the , instead of before :grinning_face_with_big_eyes:
Thank you! It works now!