# Split QTY equally by number of cells(variable) and also round off if uneven.

#### ziggyfo

##### New Member
Hi All,

I am after a formula that could help me get the following;

1. Cell "B1" is the source and will be a variable value. This value should be divided by the amount of order numbers and then split equally between the amount of orders (also variable)
2. Cell "C5:C14" must contain an equal amount
3. Cell "C15" must total the same amount as "B1" so I suspect some rounding would be required (see example scenario on the right of the image in "G15"

I don't always know how many orders there will be, but I always need to split the value in B1 equally between all orders and round it up at the bottom total to ensure its an even number and not 6.99 as below (this may occur if the value that's being divided doesn't quite total up to the same due to the decimals)

A:C and E:G are the same thing, I just gave two different examples of how the data might change and look.

Appreciate any help

### Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

#### JimM

##### Well-known Member
In C5

=if(A5>0,\$B\$1/COUNT(\$A\$5:\$A\$14),"")

and copy down

In C15

=ROUND(SUM(C5:C14),0)

#### ziggyfo

##### New Member
Thanks JimM, that did it.

Replies
3
Views
135
Replies
6
Views
220
Replies
11
Views
718
Replies
10
Views
242
Replies
16
Views
807

1,133,615
Messages
5,659,855
Members
418,534
Latest member
Ajith55

### 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.

### Which adblocker are you using?

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

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