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! Go to 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.
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.
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |