Rounding to the Nearest Limit in ExcelID: Q63973
|
Microsoft Excel is capable of rounding to the nearest specified number
of digits, but to round to the nearest fraction, you must use the
following formula:
=IF(MOD(A1,fraction)<(fraction/2),A1-MOD(A1,fraction),
A1+fraction-MOD(A1,fraction))
=IF(MOD(A1,(1/8))<((1/8)/2),A1-MOD(A1,(1/8)),A1+(1/8)
-MOD(A1,(1/8)))
=IF(MOD(A1,5)<(5/2),A1-MOD(A1,5),A1+5-MOD(A1,5))
Additional query words: 2.1 2.10 3.0 4.0
Keywords : kbhowto
Version :
Platform :
Issue type :
Last Reviewed: March 22, 1999