Round() Function



The Excel Round function returns a number rounded to a given number of digits. The Round function can round to the right or left of the decimal point.


Syntax

The syntax for the ROUND function in Microsoft Excel is:

=ROUND( number, digits )

Parameters or Arguments

number

The number to round.

digits

The number of digits to round the number to.

Excel Round Function Examples

Column B of the following spreadsheet shows several examples of the Excel Round function:

Formulas:


A
B
1
100.319
=ROUND( A1, 1 )
2
5.28
=ROUND( A2, 1 )
3
5.9999
=ROUND( A3, 3 )
4
99.5
=ROUND( A4, 0 )
5
-6.3
=ROUND( A5, 0 )
6
-100.5
=ROUND( A6, 0 )
7
-22.45
=ROUND( A7, 1 )
8
999
=ROUND( A8, -1 )
9
991
=ROUND( A9, -1 )

Results:


A
B
1
100.319
100.3
2
5.28
5.3
3
5.9999
6
4
99.5
100
5
-6.3
-6
6
-100.5
-101
7
-22.45
-22.5
8
999
1000
9
991
990

The above examples show how the Round function rounds up or down, to the nearest value with the specified number of decimal places.

Notes:

Ø  Round works by rounding numbers 1-4 down, and rounding numbers 5-9 up.
Ø  The ROUND function rounds numbers to a specified level of precision. It can round to the right or left of the decimal point.
Ø  If num_digits > 0,  number is rounded to the specified number of decimal places to the right of the decimal point.
Ø  If num_digits < 0,  number is rounded to the left of the decimal point (i.e. to the nearest 10, 100, 1000, etc.).
Ø  If num_digits = 0,  number is rounded to the nearest integer.

References



No comments:

Post a Comment

OR Function