Rounding to a quarter of a percent

D

D Huber

I am trying to round a list of numbers to the nearest quarter of a percent.

e.g. 0.0419 to 4.25%
0.0158 to 1.50%
0.0639 to 6.50%
0.0885 to 8.75%

Is there a simple function to do this or will I have to do countless nested
if statements.
 
C

Chris M

Weeelll,

You could multipy by 400, round to the nearest whole number then divide by 4

somthing like

CInt([number]*400)/4

or you could try somthing like this:

http://support.microsoft.com/?kbid=209996

Might need a little work to round to nearest rather than up or down...

Cheers,

Chris.
 
D

D Huber

It worked. Thanks.

Allen Browne said:
How about:

Round(4 * [Field1], 2) / 4

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

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

D Huber said:
I am trying to round a list of numbers to the nearest quarter of a percent.

e.g. 0.0419 to 4.25%
0.0158 to 1.50%
0.0639 to 6.50%
0.0885 to 8.75%

Is there a simple function to do this or will I have to do countless
nested
if statements.
 
Top