Jump to content
Sign in to follow this  
GDavis88

Rounding

Recommended Posts

Hi everybody i am having serious trouble. I have a total cost field that i am trying to have round up or down to the nearest .05

Round ( (Cost + Sales Tax) ; .05 )

i have tried that but it almost always gives me a whole amount

EX. $4.47 = $4.00

What i would like is for $4.47 to equal $4.45

so please any help would be greatly appreciated

Edited by Guest

Share this post


Link to post
Share on other sites

comment im sorry but i was wrong i need it to only round down if you could be so nice to help me again

Share this post


Link to post
Share on other sites

that is working great but on occasion it will round when it shouldnt

EX.

24.45 + 1.25 = 25.70

but it will take that and round it to 25.65

Share this post


Link to post
Share on other sites

Most likely, your data is not what you think it is - e.g. the 1.25 is actually 1.249999999.

Share this post


Link to post
Share on other sites

you were right as always but is there a way to make it not do that? im guessing i would have to put a round calculation in the sales tax calculation field?

Share this post


Link to post
Share on other sites

so i think i got it would this be right

Ceiling ( (Cost * .051) * 10 ^ 2 ) * 10 ^ -2

Edited by Guest

Share this post


Link to post
Share on other sites

There's no single correct answer here - it all depends on the reason behind the rounding. Obviously, if you're rounding twice, you may get a discrepancy. It's best to round EITHER the tax OR the total.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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