0

I have several decimal value cells in Excel which I want to round off to integers. I am also taking their sum. The problem is,

enter image description here

3.32+ 4.41 = 7.73 But if I round off each cell using simple formatting, I am getting 3+4=8. This problem does not arise when I use =ROUND(cell, 0) in each cell.

Is there any easy way to round off all cells without manually correcting each cell as I have large dataset?

rgt
  • 31
  • 1
  • 8
  • Formatting is not rounding. The values behind still have the commas. If you want rounded values, you will need to use the `round` function – derpirscher Aug 22 '23 at 06:04
  • Yes, my query is whether i can apply round function to all cells at once instead of applying it to cell one by one – rgt Aug 22 '23 at 06:20
  • 2
    Does this answer your question? [How to add ROUND() in every cell of selection, but](https://stackoverflow.com/questions/34159016/how-to-add-round-in-every-cell-of-selection-but) – user11222393 Aug 22 '23 at 06:54
  • If you're going to round off in your case, you'll get 7 while 8 is more accurate, what is your intended result there? – Notus_Panda Aug 22 '23 at 07:33
  • I want the result to be 7 as I have to report the table in integers only – rgt Aug 22 '23 at 07:35
  • So as well as round() there is roundup() and rounddown(). – Solar Mike Aug 22 '23 at 07:37
  • https://stackoverflow.com/questions/34159016/how-to-add-round-in-every-cell-of-selection-but I don't know to use VBA if it is that code. Sorry – rgt Aug 22 '23 at 07:40
  • 2
    Afaik, there's no way to use the round function on all your cells without VBA. Here's [how to get into the VBE](https://www.geeksforgeeks.org/how-to-insert-and-run-vba-code-in-excel/) and the code user11222393 gave you, you can then put into the ThisWorkbook section from the screenshots you'll see there. – Notus_Panda Aug 22 '23 at 08:18
  • 1
    Consider using `ROUND` in your formula. For example `=SUM(ROUND(A1:B1,0))` would return `7` in the example you provide. This is not rounding all the cells, but without VBA, it might be useful. – Ron Rosenfeld Aug 22 '23 at 10:09

0 Answers0