Rounding and rounding...


Posted by Jo on December 20, 2001 11:19 PM

Hi,

Can someone help me finding the correct formula for the following matter:

Sample :

15,00 / 2,05 = 7,31

In fact because of special needs :

- if the last decimal number is < to 3, the result should be rounded to 0,

- if the last decimal number is > or = to 3, the result should be rounded to 5, (ex : 30,00 / 2,05 = 14,63 should be 14,65),

- if the last decimal number is already at 5, it has to be keeped as it is (ex : 45,00 /2,05 = 21,95)

Thanks in advance

Posted by Aladin Akyurek on December 20, 2001 11:40 PM

Jo --

=ROUND((A1/B1)/0.05,0)*0.05

where (A1/B1) is the number to round.

Is this what you're looking for?

Aladin

=======



Posted by Jo on December 21, 2001 1:28 AM

Aladin, like the lamp...you'r great man...

Thanks a lot, it works fine.