Round off in Appsheet

Hi,

I wanted to understand how rounding off works in appsheet as I am facing a roadblock where if my value computed is lesser than .5 then I want it to be rounded off to nearest 5 and if itโ€™s greater than .5 then I want it to be rounded off to nearest 0.

For eg: 4.2 to be rounded to 4.5 and 4.7 rounded to 5.

Is there a way this can be achieved?

Solved Solved
0 5 485
1 ACCEPTED SOLUTION

Or possibly

CEILING([Your Number]/0.5)*0.5

Since you are looking for rouding up to only higher 0.5 based on your shared example.

View solution in original post

5 REPLIES 5

ROUND() only works with rounding up or down to the nearest integer.

I was thinking about this question for a while, but I never came up with anything fancy. I think the best thing you can do here is manually check whether the decimal is below 0.5 or higher. Something like:

IF(
  [number] - FLOOR( [number] ) <= 0.5 ,
  FLOOR( [number] ) + 0.5 ,
  CEILING( [number] )
)

Thank you for the help

Or possibly

CEILING([Your Number]/0.5)*0.5

Since you are looking for rouding up to only higher 0.5 based on your shared example.

I think this is exactly the โ€œfancyโ€ solution I was looking for! Man, I knew it was out there, just couldnโ€™t quite grasp itโ€ฆ

Thank you for the help.

Top Labels in this Space