# If (field name) is multiple of 4, Round up?

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!

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

1 Like

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.

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

Ah OK, think you need this:

`ROUNDUP({12" GH}/4, 0)`

1 Like

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?

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.

1 Like

So you should end up with this:

1 Like

OHHH ok Gotcha!! I was trying to /4 after the , instead of before

Thank you! It works now!

1 Like