Wednesday, May 5, 2021

Round a number to the decimal places i want

If you don't want unnecessary decimal places in cells because they cause ###### symbols to appear, or you don't need accuracy down to the microscopic level, change the cell format to get the number of decimal places you want.

Round a number to nearest major unit

If you want to round a number to the nearest major unit, such as thousands, hundreds, tens, or ones, use a function in a formula, follow these steps:

By using a button:

  1. Select the cells that you want to format.

  2. On the Home tab, click Increase Decimal or Decrease Decimal to show more or fewer digits after the decimal point.

By applying a built-in number format:

  1. On the Home tab, in the Number group, click the arrow next to the list of number formats, and then click More Number Formats.

The Number group on the Home tab

  1. In the Category list, depending on the type of data you have, click Currency, Accounting, Percentage, or Scientific.

  2. In the Decimal places box, enter the number of decimal places that you want to display.

By using a function in a formula:

Round a number to the number of digits you want by using the ROUND function. This function has only two arguments (arguments are pieces of data the formula needs to run).

  • The first argument is the number you want to round, which can be a cell reference or a number.

  • The second argument is the number of digits you want to round the number to.

Suppose that cell A1 contains 823.7825. To round the number to the nearest:

  • Thousand s

    • Type =ROUND(A1,-3) which equals 1,000

    • 823.7825 is closer to 1,000 than to 0 (0 is a multiple of 1,000 )

    • Use a negative number here because you want the rounding to happen to the left of the decimal point. The same thing applies to the next two formulas that round to hundreds and tens.

  • Hundreds

    • Type =ROUND(A1,-2) which equals 800

    • 800 is closer to 823.7825 than to 900. We think you get the idea by now.

  • Tens

    • Type =ROUND(A1,-1) which equals 820

  • Ones

    • Type =ROUND(A1,0) which equals 824

    • Use a zero to round the number to the nearest single digit.

  • Tenths

    • Type =ROUND(A1,1) which equals 823.8

    • Use a positive number here to round the number to the number of decimal points you specify. The same thing applies to the next two formulas that round to hundredths and thousandths.

  • Hundredths

    • Type =ROUND(A1,2) which equals 823.78

  • Thousandths

    • Type = ROUND(A1,3) which equals 823.783

Round a number up by using the ROUNDUP function. It works just the same as ROUND, except that it always rounds a number up. For example, if you want to round 3.2 up to zero decimal places:

  • =ROUNDUP(3.2,0) which equals 4

Round a number down by using the ROUNDDOWN function. It works just the same as ROUND, except that it always rounds a number down. For example, if you want to round down 3.14159 to three decimal places:

  • =ROUNDDOWN(3.14159,3) which equals 3.141

Tip:  To get more examples, and to play around with sample data in an Excel Online workbook, see the ROUND, ROUNDUP, and ROUNDDOWN articles.

  1. Click in an empty cell.

  2. On the Formulas tab, under Function, click Formula Builder.

  3. Do any of the following:

    To

    In the Formula Builder, search for, and then double-click

    Under Arguments

    Round a number up

    ROUNDUP

    In number, type the number you are rounding up. In num_digits, type 0 to round the number up to the nearest whole number.

    Round a number down

    ROUNDDOWN

    In number, type the number you are rounding down. In num_digits, type 0 to round the number up to the nearest whole number.

    Round up to an even number

    EVEN

    In number, type the number you are rounding.

    Round up to an odd number

    ODD

    In number, type the number you are rounding.

    Round a number to the nearest multiple of another number

    MROUND

    Click the box next to multiple, and then type the number you want the nearest multiple of.

  4. Press RETURN .

You can set a default decimal point for numbers in Excel Options.

  1. Click Options (Excel 2010 to Excel 2016), or the Microsoft Office Button Office button image > Excel Options (Excel 2007).

  2. In the Advanced category, under Editing options, select the Automatically insert a decimal point check box.

  3. In the Places box, enter a positive number for digits to the right of the decimal point or a negative number for digits to the left of the decimal point.

    Note: For example, if you enter 3 in the Places box and then type 2834 in a cell, the value will be 2.834. If you enter -3 in the Places box and then type 283 in a cell, the value will be 283000.

  4. Click OK.

    The Fixed decimal indicator appears in the status bar.

  5. On the worksheet, click a cell, and then type the number that you want.

    Note: The data that you typed before you selected the Fixed decimal check box is not affected.

  • To temporarily override the fixed decimal option, type a decimal point when you type the number.

  • To remove decimal points from numbers that you already entered with fixed decimals, do the following:

    1. Click Options (Excel 2010 to Excel 2016), or the Microsoft Office Button Office button image > Excel Options (Excel 2007).

    2. In the Advanced category, under Editing options, clear the Automatically insert a decimal point check box.

    3. In an empty cell, type a number such as 10, 100, or 1,000, depending on the number of decimal places that you want to remove.

      For example, type 100 in the cell if the numbers contain two decimal places and you want to convert them to whole numbers.

    4. On the Home tab, in the Clipboard group, click Copy Button image or press CTRL+C.

    5. On the worksheet, select the cells that contain the numbers with decimal places that you want to change.

    6. On the Home tab, in the Clipboard group, click the arrow below Paste, and then click Paste Special.

    7. In the Paste Special dialog box, under Operation, click Multiply.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Round a number

Why does a number appear rounded?

No comments:

Post a Comment