Tip Printed from ExcelTip.com
Rounding Numbers that Meet Specified Criteria


Problem:

Rounding all the numbers in column A to zero decimal places, except for those that have "5" in the first decimal place.

Solution:

Use the IF, MOD, and ROUND functions in the following formula:
=IF(MOD(A2,1)=0.5,A2,ROUND(A2,0))