Rounding numbers to highest integer

Greetings all. I am calculating with this formula:

Numerator variable / 160

For example, 520 /160 = 3.25

I want whatever the answer is to be rounded to the next highest integer, in this case it would be 4.

Here’s what I’ve tried and their results:

  • floor(520/160) = 3

  • roundHalfUp(520/160,0) = 3

  • roundHalfUp((520/160)/0.5,0)*0.5 = 3.5

where the last attempt was inspired from this thread.

Anyone can come out with a custom calculation to get to the next highest integer (i.e. 4 in this case)? Thanks in advance!

Hi @badger101
You are just missing ‘ceil()’ round type, maybe…

BR

3 Likes

@gonhaddock Got it!

ceil(520/160) solves it, many thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.