XL: Rounding a Number to a Set Limit

ID: Q24720


The information in this article applies to:


SUMMARY

To round a number to a set limit, use one of the following formulas.

Microsoft Excel 4.0 and Later

=CEILING(<value>,<limit>)
Where <value> is either a cell reference to the actual value to be rounded or a number to be rounded, and <limit> is the number to be rounded to.

For example, to round the number in cell A1 to the nearest .05, use the following formula:
=CEILING(A1,.05)

Microsoft Excel 3.0 and Earlier

=ROUND(<value>/<limit>,0)*<limit>
Where <value> is either a cell reference to the actual value to be rounded or a number to be rounded, and <limit> is the number to be rounded to.

For example, to round the number in cell A1 to the nearest .05, use the following formula:
=ROUND(A1/.05,0)*.05


REFERENCES

For more information about the ROUND and CEILING functions, see the appropriate source below.

If you are using Microsoft Excel for Windows 95, version 7.0, click the Index tab in Help, type the following text


   ROUND

    -or-

   CEILING 


and then double-click the selected text to go to the ROUND topic.

If you are using Microsoft Excel 5.0, click the Search button in Help, and type:


   ROUND

    -or-

   CEILING 


"Microsoft Excel Function Reference," version 4.0, page 364

"Microsoft Excel Function Reference" version 3.0, 200-201

"Microsoft Excel Functions and Macros" version 2.2, 75-76

Additional query words: fraction integer how to nearest


Keywords          : 
Version           : MACINTOSH:1.x,2.x,3.0,4.0,5.0,5.0a; WINDOWS:3.x,4.0,5.0,5.0c,7.0
Platform          : MACINTOSH WINDOWS 
Issue type        : kbhowto 

Last Reviewed: March 11, 1999