Jump to content

Rounding up


This topic is 2245 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'd like to bump up some decimal places, not sure how to do this? Basically want .00, .10, .20, .30, .40, .50, .60 etc and .05, .15, .25, .35, .45 etc.

0.01 to 0.04 = 0.5

0.05 to 0.09 = 0.10

 

19.50 to 19.50 (no change)

19.25 to 19.30

19.26 to 19.30

19.01 to 19.05

19.02 to 19.05

Link to comment
Share on other sites

Siroos12's  calculation works, but keep in mind that decimal numbers in FileMaker never have trailing zeros. You can format the display of numbers to 2 decimal places in the Inspector, but the actual data will still be only 1 decimal place if it ends with 0 (or none if the result of the calculation should be 6.00). 

Edited by Lee Smith
removed background color caused by pasting text
Link to comment
Share on other sites

It didn't work for me, I ended up doing this:

Let ( [ Num = TABLE::FIELD / .1 ; Integ = Int ( Num ) ; Frac = Num - Integ ] ; ( Integ + Ceiling ( Frac ) ) * .1 )

Got me close enough

Link to comment
Share on other sites

This topic is 2245 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.