RoundDown

  • Thread starter Thread starter DS
  • Start date Start date
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
 
This seems to work.
DS

Public Function DN(MyField)
DN = Int([MyField] * 100) / 100
End Function
 
Thanks Allen.
So should I use Fix instead of Int?
I don't beleive that I will have negative values.
Thanks
DS
 
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.
 
Back
Top