On Mon, 29 Aug 2005 08:50:10 -0700, "Mikus"
wrote:
Is it possible to construct function that rounds down if 5 is met
For example:
1) 2.455 = 2.45
2) 2.454 = 2.45
3) 2.456 = 2.46
ROUND function (num_digits = 2) does following
1) 2.455 = 2.46
2) 2.454 = 2.45
ROUNDUP function (num_digits = 2) does following
1) 2.455 = 2.46
2) 2.454 = 2.46
I believe this formula will do what you describe:
=IF(MOD(INT(A1*10^(NumDigits+1)),10^(NumDigits-1))<=5,
ROUNDDOWN(A1,NumDigits),ROUND(A1,NumDigits))
--ron
|