This function rounds a number up (away from zero) to the specified number of digits.
Syntax:
ROUNDUP(number; num_digits)
Arguments:
- number (required) – The real number to be rounded up.
- num_digits (required) – The number of decimal places to round up to.
Key Behavior:
Unlike standard rounding (ROUND()), ROUNDUP() always rounds up regardless of the digit value.
Rules Based on num_digits:
- num_digits > 0: Rounds up to the specified decimal places.
- num_digits = 0: Rounds up to the nearest integer.
- num_digits < 0: Rounds up to the left of the decimal point (e.g., tens, hundreds).
Special Cases:
- Negative numbers round toward zero (e.g., -2.8 → -2).
- Zero or positive numbers round away from zero (e.g., 1.1 → 2).
Examples:
