I have been trying to find a way to split numbers in excel just by using formula.

The aim was to use the list below

```

Pens:
Black:30
Blue:20
Red:47
Green:17
Total:114

```

To split into different boxes the number of boxes is determined by how many pens can fit in a box in this case the max is 22.

The formula for the boxes calculation :

```

`=114 / 22 = 5.18`

```

which is rounded up into 6 boxes needed

Is there any formula which is capable of splitting the numbers into the boxes, the colour can be mixed doesn't have to be one colour only.

Note: the boxes don't have to be filled to the max it would be much better if it can be split nicely into the 6 boxes.

```

The expected output: when splitting nicely
Pen:
Black : 19 11 0 0 0 0
Blue:   0 8 12 0 0 0 
Red:    0 0 7 19 19 2
Green:  0 0 0 0 0 17
Total:  19 19 19 19 19 19

```