Rounding numbers to the nearest 0.5

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to work out a way of rounding up a number to the nearest 0.5 value,
E.g.
1.01 -> 1.49 = 1.5
1.51 -> 1.99 = 2
and so on.
I have tried the CInt, but that will only round up to whole nubmers, the Int
and Fix functions do not achieve what I am after either, unless I am missing
something!
Many thanks for your help in advance.
Richard S
 
Allen
Thank you for that, works a treat! A fresh pair of eyes always helps with
these things!
BTW, like your wbsite, absolute godsend!
Richard S

Allen Browne said:
Try:
-Int(-2 * [Amount]) / 2

Substitute your field name for Amount.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Richy Savage said:
I am trying to work out a way of rounding up a number to the nearest 0.5
value,
E.g.
1.01 -> 1.49 = 1.5
1.51 -> 1.99 = 2
and so on.
I have tried the CInt, but that will only round up to whole nubmers, the
Int
and Fix functions do not achieve what I am after either, unless I am
missing
something!
Many thanks for your help in advance.
Richard S
 
Back
Top