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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
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
 
Upvote 0
I suggest to look for formula solutions to distribute parliament seats after an election, for example the Hare/Niemeyer method or d'Hondt.
 
Upvote 0
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:
 
Upvote 0
Indeed i encountered the same thing - and asked the creator to help me on that...
Is this the solution?
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

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