Rounding and Sums

aldryk

New Member
Joined
Mar 16, 2021
Messages
3
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi All,

I try to do something but cannot find the solution - so i turn to you for help.

In Cell A1 there is a low number (from 1 upto 30) - (number of systems)

In Cells B1 to B10 - 10 percentages that sums to 100% - for example - 40%,20%,20%,20%,0%,0%,0%.... (allocation per region)

I need to allocate those systems per region, but i cannot have 0.X systems.. so only integer/full numbers. (in cells C1 to C10)

Logic says that if for example the system count is 2, and the percentages are as above, then Region 1 (40%) will get 1, and the next region (20%) will get 1. all others (even the other 20%) will have 0.
or if the system count is 6, 40% will get 3, all other 20% will get 1 each.

Is there a way to do that without VBA? only with pure formulas?

thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,268
Try this:
In C1 =ROUND($A$1*B1,0)
In C2 =ROUND(($A$1-SUM(C$1:C1))/(SUM(B2:B$7))*B2,0)
Copy C2 down up to C7

Bye
 

Sulprobil

Board Regular
Joined
May 12, 2020
Messages
161
I suggest to look for formula solutions to distribute parliament seats after an election, for example the Hare/Niemeyer method or d'Hondt.
 

Sulprobil

Board Regular
Joined
May 12, 2020
Messages
161
I suggest to look for formula solutions to distribute parliament seats after an election, for example the Hare/Niemeyer method or d'Hondt.
An approach which minimizes the absolute error:
 

aldryk

New Member
Joined
Mar 16, 2021
Messages
3
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Indeed i encountered the same thing - and asked the creator to help me on that...
Is this the solution?
 

Forum statistics

Threads
1,144,615
Messages
5,725,321
Members
422,613
Latest member
salim9696

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
Top