Here are 10 Excel rounding functions, including examples of how to use them with data and formulas:
1. ROUND
Rounds a number to a specified number of digits.
Formula:
=ROUND(number, num_digits)
Example:
=ROUND(3.14159, 2) // Returns 3.14
2. ROUNDUP
Rounds a number up, away from zero.
Formula:
=ROUNDUP(number, num_digits)
Example:
=ROUNDUP(3.14159, 2) // Returns 3.15
3. ROUNDDOWN
Rounds a number down, toward zero.
Formula:
=ROUNDDOWN(number, num_digits)
Example:
=ROUNDDOWN(3.14159, 2) // Returns 3.14
4. MROUND
Rounds a number to the nearest multiple of a specified value.
Formula:
=MROUND(number, multiple)
Example:
=MROUND(7, 3) // Returns 6 (nearest multiple of 3)
5. CEILING
Rounds a number up to the nearest multiple of significance.
Formula:
=CEILING(number, significance)
Example:
=CEILING(4.3, 0.5) // Returns 4.5
6. FLOOR
Rounds a number down to the nearest multiple of significance.
Formula:
=FLOOR(number, significance)
Example:
=FLOOR(4.7, 0.5) // Returns 4.5
7. INT
Rounds a number down to the nearest integer.
Formula:
=INT(number)
Example:
=INT(3.9) // Returns 3
8. TRUNC
Truncates a number to a specified number of decimal places (no rounding).
Formula:
=TRUNC(number, [num_digits])
Example:
=TRUNC(3.14159, 2) // Returns 3.14
9. EVEN
Rounds a number up to the nearest even integer.
Formula:
=EVEN(number)
Example:
=EVEN(3.2) // Returns 4
10. ODD
Rounds a number up to the nearest odd integer.
Formula:
=ODD(number)
Example:
=ODD(3.2) // Returns 5
Example with Data:
A | B (Formula) | C (Result) |
---|---|---|
3.14159 | =ROUND(A1, 2) | 3.14 |
4.7 | =FLOOR(A2, 0.5) | 4.5 |
7 | =MROUND(A3, 3) | 6 |
3.9 | =INT(A4) | 3 |
3.2 | =EVEN(A5) | 4 |
These functions are useful for various rounding scenarios in Excel, depending on your specific needs. Let me know if you need further clarification!
No comments:
Post a Comment