Rounding issue

londa_vba

Board Regular
Joined
May 11, 2023
Messages
61
Office Version
  1. 365
Platform
  1. Windows
Hello
I am trying to show numbers in my chart to one decimal place. My issue arises because the numbers in Columns A and B have to =15 and Excel insists on rounding to one decimal rather than truncating the number to one decimal. So I have instances where column A has 3.75 rounded to 3.8 and column B has 11.25 rounded to 11.3. It displays at 3.8 and 11.3 which does not = 15 exactly. Please assist. I would prefer to not use VBA just use a formula or setting changes.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
If you want to truncate numbers to one decimal place you will need two more columns and plot your data from those columns.

Excel Formula:
=INT(A1*10)/10
=INT(B1*10)/10

BUT I think you are asking the wrong question if you need these numbers to add up to exactly 15. If you truncate 3.75 to 3.7 and 11.25 to 11.2 they add up to 14.9. Still not 15.

The only way to avoid this is to absorb the rounding error. If you do it in the second number then you will need two columns like this:
Excel Formula:
=INT(A1*10)/10
=15-A1
 
Upvote 1
Solution
If you want to truncate numbers to one decimal place you will need two more columns and plot your data from those columns.

Excel Formula:
=INT(A1*10)/10
=INT(B1*10)/10

BUT I think you are asking the wrong question if you need these numbers to add up to exactly 15. If you truncate 3.75 to 3.7 and 11.25 to 11.2 they add up to 14.9. Still not 15.

The only way to avoid this is to absorb the rounding error. If you do it in the second number then you will need two columns like this:
Excel Formula:
=INT(A1*10)/10
=15-A1

If you want to truncate numbers to one decimal place you will need two more columns and plot your data from those columns.

Excel Formula:
=INT(A1*10)/10
=INT(B1*10)/10

BUT I think you are asking the wrong question if you need these numbers to add up to exactly 15. If you truncate 3.75 to 3.7 and 11.25 to 11.2 they add up to 14.9. Still not 15.

The only way to avoid this is to absorb the rounding error. If you do it in the second number then you will need two columns like this:
Excel Formula:
=INT(A1*10)/10
=15-A1
Yes you are right the second portion of your answer solves my issues. Thank you so much.
 
Upvote 0
It depends on what your data means but you might also considering explicitly rounding the first number instead of truncating to one place:
Excel Formula:
=ROUND(A1,1)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top