Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

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

Topic Labels: Formulas
3196 8
cancel
Showing results for 
Search instead for 
Did you mean: 
Lisa_H
6 - Interface Innovator
6 - Interface Innovator

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!

8 Replies 8

Hi @Lisa_H - try this:

IF(MOD({12" GH}, 4) = 0, {12" GH} * 0.25, ROUNDUP({12" GH}, 0) * 0.25)

Screenshot 2019-07-12 at 21.27.09.png

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

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.

Lisa_H
6 - Interface Innovator
6 - Interface Innovator

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)

Screenshot 2019-07-12 at 21.40.55.png

Lisa_H
6 - Interface Innovator
6 - Interface Innovator

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.

So you should end up with this:

Screenshot 2019-07-12 at 21.46.40.png

Lisa_H
6 - Interface Innovator
6 - Interface Innovator

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

Thank you! It works now!