Thursday, 30 January 2025

round

 In Excel, rounding functions are used to round numbers to a specified number of decimal places or significant digits. Below are 10 rounding functions, including examples with data and formulas:


1. ROUND

Rounds a number to a specified number of digits.

Formula:

excel
Copy
=ROUND(number, num_digits)

Example:

excel
Copy
=ROUND(3.14159, 2)  // Returns 3.14

2. ROUNDUP

Rounds a number up, away from zero.

Formula:

excel
Copy
=ROUNDUP(number, num_digits)

Example:

excel
Copy
=ROUNDUP(3.14159, 2)  // Returns 3.15

3. ROUNDDOWN

Rounds a number down, toward zero.

Formula:

excel
Copy
=ROUNDDOWN(number, num_digits)

Example:

excel
Copy
=ROUNDDOWN(3.14159, 2)  // Returns 3.14

4. MROUND

Rounds a number to the nearest multiple of a specified value.

Formula:

excel
Copy
=MROUND(number, multiple)

Example:

excel
Copy
=MROUND(7, 3)  // Returns 6 (nearest multiple of 3)

5. CEILING

Rounds a number up to the nearest multiple of significance.

Formula:

excel
Copy
=CEILING(number, significance)

Example:

excel
Copy
=CEILING(4.3, 0.5)  // Returns 4.5

6. FLOOR

Rounds a number down to the nearest multiple of significance.

Formula:

excel
Copy
=FLOOR(number, significance)

Example:

excel
Copy
=FLOOR(4.7, 0.5)  // Returns 4.5

7. INT

Rounds a number down to the nearest integer.

Formula:

excel
Copy
=INT(number)

Example:

excel
Copy
=INT(3.9)  // Returns 3

8. TRUNC

Truncates a number to a specified number of decimal places (no rounding).

Formula:

excel
Copy
=TRUNC(number, [num_digits])

Example:

excel
Copy
=TRUNC(3.14159, 2)  // Returns 3.14

9. EVEN

Rounds a number up to the nearest even integer.

Formula:

excel
Copy
=EVEN(number)

Example:

excel
Copy
=EVEN(3.2)  // Returns 4

10. ODD

Rounds a number up to the nearest odd integer.

Formula:

excel
Copy
=ODD(number)

Example:

excel
Copy
=ODD(3.2)  // Returns 5

Example Data and Formulas in a Table:

NumberFormulaResult
3.14159=ROUND(A2, 2)3.14
3.14159=ROUNDUP(A3, 2)3.15
3.14159=ROUNDDOWN(A4, 2)3.14
7=MROUND(A5, 3)6
4.3=CEILING(A6, 0.5)4.5
4.7=FLOOR(A7, 0.5)4.5
3.9=INT(A8)3
3.14159=TRUNC(A9, 2)3.14
3.2=EVEN(A10)4
3.2=ODD(A11)5

These functions are useful for various scenarios, such as financial calculations, data analysis, and formatting numbers for reports.

No comments:

Post a Comment