Excel decimal rounding?

How can I round a number in excel, for example, formatting it so that the actual number changes, and not just its appearance in the cell.

For example, if I have 229.729599999998 in a cell and I format the cell to show only 4 decimal places, now it will display 229.7296 in the cell, but the cell value will still be 229.729599999998, so if I did any excel calculations there would be use a longer decimal number, contrasting 4 decimal numbers.

Is there a way to do this so that not only the appearance of the number in the cell shows 4 decimal places, but so that the actual value of the cell reflects 4 decimal numbers, so that the cell and value in the formula bar will display 229.7296, and not 229.729599999998.

I know that maybe I can use a function or formula in an adjacent cell to round a number, but I just put together a huge spread sheet and it would take a very long time if I had to do the same for all cells in my sheet. Any ideas?

+5
source share
4 answers

Two ways I can think of will be:

  • if it is one: create a new tab where each cell is calculated based on the original sheet, for example, in cell A1: =ROUND(OriginalTab!A1,4)etc. Then copy the custom values ​​back to the original sheet.
  • to run the vba macro, which will cover every cell of your sheet up to 4 decimal places.
+5
source

CSV. CSV , ...

+6

: " " ( ).

excel

  

(15 ) , .

  
+3

, .

, ,

( ), int 100. . MROUND . 100 .

Example: = ((MROUND (((K7-J8) -INT (K7-J8)) * 100.10)) / 100) + INT (K7-J8) if the value was 229.729599999998, the new value is 229.700000000000

Alternative method Depending on the number of places you want for the decimal number. MOD (value, 1), which gives you the decimal part * 100 for two places 1000 for 3 places 10000 for 4 places, etc. GOAL. Then divide by the same number that you multiplied above Ex. 1000 for 3 places and finally add it back to an integer or value.

Ex. = (ROUND (INT (MOD (U9,1) * 1000), 10)) / 1000 + INT (U9) This would make the number 229.730

+1
source

All Articles