# Macro + Excel functions: Braking a cell value in random number of parts to keep total same;each part mentioned in different cell;

#### darpandce

##### New Member
Dear Excel Experts,

I have problem:

I have a column (say, A) having 1000 values; ranging from anything 2 to 35 in each of the cell of that column.

suppose, cell A1 has value of 20. I need to divide this value of 20 in some 'random' number of parts.. e.g., mentioning randbetween (1,5)..so that sum of all the parts should equal to 20 only.. and each part should be integer. again, i have no fixed percentage that each part would be having.

Also, each part must be put into a separate column .i.e., if 20 has been broken into 4 parts of 6,9,4,1 .. then these numbers will be put in different column say.. D1,D2,D3,D4...

once i do it for single cel... then I need to run this for all 1000 cells mentioned in column 'A'... with each split entry getting appended after the last division of entries.... eg.. '20' was divided into D1,D2,D3,D4.....so, next cell value, once divided, will continue from D5, D6, D7.. etc..

### Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Is there a minimum/maximum number of parts you would want?

E.g.

For the number 2 is 1 part ok and for 2 to be transferred over or would you like it to always be 1, 1?
Similarly for 20 would 20 parts be ok 1,1,1,etc?

Replies
1
Views
222
Replies
8
Views
241
Replies
1
Views
487
Replies
3
Views
550
Replies
2
Views
373

1,203,455
Messages
6,055,541
Members
444,794
Latest member
HSAL

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