RoundDown

D

DS

I'm using this to Round Up.
Public Function UP(MyField)
UP = Int(-100 * [MyField]) / -100
End Function

Is there something that I can use to Round Down?
Thanks
DS
 
D

DS

This seems to work.
DS

Public Function DN(MyField)
DN = Int([MyField] * 100) / 100
End Function
 
D

DS

Thanks Allen.
So should I use Fix instead of Int?
I don't beleive that I will have negative values.
Thanks
DS
 
A

Allen Browne

I'm not saying you should use Fix instead of Int.

I'm merely highlighting that "rounding down" and "rounding towards zero" are
not the same thing.

If you won't ever have a negative value, that's a non-issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top