Rounding percentages in calculations

CVC

New Member
Joined
Jun 20, 2008
Messages
3
How do you make sure that all values add up to 100% when rounding is involved?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

As long as you use ROUND and not ROUNDUP or ROUNDDOWN I would always expect them to if they've been calculated correctly in the first place.

I could well be wrong though.

Edit - Which I obviously am having tried it. Question - Why round the percentages in the first place?

Dom
 
Last edited:
Upvote 0
Hi,

How many percentages are you working with?

EDIT. HI Domski, unfortunately using round it is possible not to get exactly 100%.
 
Upvote 0
You could round all but one of your percentages to say 2 decimal places. Then calculate the final percentage as =1-SUM(A1:A100) ...where A1:A100 are the rounded percentages. If all percentages are rounded to 2 places then this result will also be.

Nothing like a bit of reverse engineering ;)

Regards
Jon
 
Upvote 0
If you only have two or three percentages you could use something hideous like this, it does the trick though.

=IF(AND(MID(A1,(FIND(".",A1)+3),3)>MID(A2,(FIND(".",A2)+3),3),MID(A1,(FIND(".",A1)+3),3)>MID(A3,(FIND(".",A3)+3),3)),ROUND(A1,2)+0.01,ROUND(A1,2))

=IF(AND(MID(A2,(FIND(".",A2)+3),3)>MID(A1,(FIND(".",A1)+3),3),MID(A2,(FIND(".",A2)+3),3)>MID(A3,(FIND(".",A3)+3),3)),ROUND(A2,2)+0.01,ROUND(A2,2))

=IF(AND(MID(A3,(FIND(".",A3)+3),3)>MID(A1,(FIND(".",A1)+3),3),MID(A3,(FIND(".",A3)+3),3)>MID(A2,(FIND(".",A2)+3),3)),ROUND(A3,2)+0.01,ROUND(A3,2))

I wouldn't normally post something like this, but it took me so long I just had to.
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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