Summary

To round a number up or down to the nearest specified digit, you can use the ROUND function with a specified number of digits. In the example shown, the formula in cell D6, copied down, is:

=ROUND(B6,C6)

Generic formula

=ROUND(number,digits)

Explanation 

The ROUND function rounds a number to a given number of places. The number of places is set by the number of digits provided in the second argument (num_digits). For example, the formulas below round the number 5.86 to 1 and zero places:

=ROUND(5.86,1) // returns 5.9
=ROUND(5.86,0) // returns 6

In the example shown, we are rounding the values in column B (which are created with the PI function) using the numbers in column B for digits. The formula in cell D6 is

=ROUND(B6,C6)

This tells Excel to take the value in B6 (PI) and round it to the number of digits in cell C6 (4) with a result of 3.1416

In the table, the ROUND function is used to round the same number (PI) to a decreasing number of digits, starting at 4 and moving down past zero to -1. Notice that digits greater than zero round to the right of the decimal point, and digits less than or equal to zero round to the left.

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.