PrecisionCalc
xl
Precision
Get Your Numbers Right

 

xlpROUNDUP

Rounds a number up (away from zero), with up to 32,767 significant digits of precision. Same as Excel's built-in ROUNDUP function, but with high precision.

Syntax

xlpROUNDUP(num,num_digit,format_negative,format_thousands,format_currency,exponential_notation)

num Required. The number to be rounded.
num_digit Required. The number of digits to which to round num.
format_negative Optional. Determines whether negatives are formatted with a leading hyphen ("-"), or parentheses ("()"). Set to 1 to format negatives with a leading hyphen. Set to 2 for parentheses. 1 by default.

You can also format negatives with a red font.

format_thousands Optional. Determines whether thousands separators are included. Set to TRUE to include thousands separators. FALSE by default.
format_currency Optional. Determines whether currency symbol is included. Set to TRUE to include currency symbol. The currency symbol will be added either to the beginning or to the end of the result, whichever is appropriate for the locale. FALSE by default.
exponential_notation Optional. Determines whether result is formatted in exponential notation. Set to TRUE to format in exponential notation. FALSE by default.

Remarks

Examples

Formula Description Result
=xlpROUNDUP(345.678,3) 345.678 rounded up (away from zero) to three decimal places. 345.678
=xlpROUNDUP(345.678,2) 345.678 rounded up (away from zero) to two decimal places. 345.68
=xlpROUNDUP(345.678,1) 345.678 rounded up (away from zero) to one decimal place. 345.7
=xlpROUNDUP(345.678,0) 345.678 rounded up (away from zero) to an integer (rounded to last digit to the left of the decimal). 346
=xlpROUNDUP(345.678,-1) 345.678 rounded up (away from zero) to one place to the left of the last digit to the left of the decimal. 350
=xlpROUNDUP(345.678,-2) 345.678 rounded up (away from zero) to two places to the left of the last digit to the left of the decimal. 400
=xlpROUNDUP(345.678,-3) 345.678 rounded up (away from zero) to three places to the left of the last digit to the left of the decimal. 1000
=xlpROUNDUP(345.678,-4) 345.678 rounded up (away from zero) to four places to the left of the last digit to the left of the decimal. 10000
=xlpROUNDUP(-345.678,2) -345.678 rounded up (away from zero) to two decimal places. -345.68
=xlpROUNDUP(-345.678,0) -345.678 rounded up (away from zero) to an integer (rounded to last digit to the left of the decimal). -346
=xlpROUNDUP(-345.678,-2) -345.678 rounded up (away from zero) to two places to the left of the last digit to the left of the decimal. -400
=xlpROUNDUP(-345.678,-3) -345.678 rounded up (away from zero) to three places to the left of the last digit to the left of the decimal. -1000
=xlpROUNDUP(345.678,2.999) 345.678 rounded up (away from zero) to two decimal places (num_digits is truncated to 2, not rounded to 3). 345.68
=xlpROUNDUP(345.678,2,,,,TRUE) 345.678 rounded up (away from zero) to two decimal places and formatted in exponential notation. 3.4568E+2
=xlpROUNDUP(A1,A2,2,TRUE,TRUE) A1 rounded up (away from zero) to A2 digits, formatted with parentheses (if negative), thousands separators, and currency symbol.

See Also

xlpINT
xlpROUND
xlpROUNDDOWN
xlpTRUNC