XL: Rounding a Number to a Set Limit

Last reviewed: February 23, 1998
Article ID: Q24720
The information in this article applies to:
  • Microsoft Excel for Windows, versions 3.x, 4.0, 5.0, 5.0c
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for the Macintosh, versions 1.x, 2.x, 3.0, 4.0, 5.0, 5.0a
  • Microsoft Excel 98 Macintosh Edition

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 since it does not


Additional query words: fraction integer
Version : WINDOWS:3.x,4.0,5.0,5.0c,7.0,97; MACINTOSH:1.x,2.x,3.0,4.0,5.0,5.0a,98
Platform : MACINTOSH WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 23, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.