XL: Undocumented ROUNDUP() and ROUNDDOWN() Functions

Last reviewed: February 2, 1998
Article ID: Q105955
The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0, 5.0c
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0, 5.0a
  • Microsoft Excel 98 Macintosh Edition

SUMMARY

The ROUNDUP() and ROUNDDOWN() functions, available in Microsoft Excel versions 4.0 and later, are not documented in the "Function Reference" version 4.0. These functions are similar to the CEILING() and FLOOR() functions.

MORE INFORMATION

ROUNDUP()

The Roundup function rounds a number up, away from zero.

Syntax:

   ROUNDUP(number, num_digits)

Number is any real number that you want rounded up. Num_digits is the number of digits to which you want to round the number.

ROUNDUP() behaves similarly to the ROUND() function, except that it always rounds a number up based on the following rules:

  • If num_digits is greater than 0, then number is rounded up to the specified number of decimal places.
  • If num_digits is 0 or omitted, then number is rounded up to the nearest integer.
  • If num_digits is less than 0, then number is rounded up to the left of the decimal point.

Examples:

   ROUNDUP(3.2,0) equals 4
   ROUNDUP(76.9,0) equals 77
   ROUNDUP(3.14159, 3) equals 3.142
   ROUNDUP(-3.14159, 1) equals -3.2
   ROUNDUP(31415.926, -2) equals 31500

ROUNDDOWN()

Rounds a number down, toward zero.

Syntax:

   ROUNDDOWN(number, num_digits)

Number: any real number that you want rounded down. Num_digits: the number of digits to which you want to round number.

ROUNDDOWN() behaves similarly to the ROUND() function, except that it always rounds a number down based on the following rules:

  • If num_digits is greater than 0, then number is rounded down to the specified number of decimal places.
  • If num_digits is 0 or omitted, then number is rounded down to the nearest integer.
  • If num_digits is less than 0, then number is rounded down to the left of the decimal point.

Examples:

   ROUNDDOWN(3.2, 0) equals 3
   ROUNDDOWN(76.9,0) equals 76
   ROUNDDOWN(3.14159, 3) equals 3.141
   ROUNDDOWN(-3.14159, 1) equals -3.1
   ROUNDDOWN(31415.92654, -2) equals 31400


Additional query words: round 4.00 4.00a 5.00 5.00a 5.00c 7.00 7.00a 97 98
XL98 XL97 XL7 XL5 XL4
Version : WINDOWS:4.0a,5.0c,7.0a,97; MACINTOSH:4.0,5.0,5.0a,98
Platform : MACINTOSH WINDOWS


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 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.