VBA code or formula to list all possibilities

cidfidou

Board Regular
Joined
Jan 19, 2009
Messages
163
Hi Excel Masters,

I would like to be able to list all the possibilities in a column of the following :

- If I have a qity of X in A1, I would like to be able to create a serie of possibilities of this qty to be dispacthed in A2 and A3 in column A as per below example... This will have to be working even with qty >0 in A2 and A3

Example

Starting position is 2 in A1 and 0 in A2 and A3 , and i would need those 2 to be sent to A3 and A4 and so on depending on X in A1 with all possibilities in the same column as below..

Any help would be greatly appreciated... Thanks in advance

Before MACro or Formula
[TABLE="width: 128"]
<colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 64"]A1[/TD]
[TD="class: xl66, width: 64, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl67"]A2[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl67"]A3[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]


After MACro or Formula[TABLE="width: 128"]
<colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody>[TR]
[TD="class: xl71, width: 64"]A1[/TD]
[TD="class: xl70, width: 64, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl71"]A2[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl71"]A3[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD]A4[/TD]
[TD="class: xl66, align: right"]1[/TD]
[/TR]
[TR]
[TD]A5[/TD]
[TD="class: xl66, align: right"]1[/TD]
[/TR]
[TR]
[TD]A6[/TD]
[TD="class: xl66, align: right"]0[/TD]
[/TR]
[TR]
[TD]A7[/TD]
[TD="class: xl67, align: right"]0[/TD]
[/TR]
[TR]
[TD]A8[/TD]
[TD="class: xl67, align: right"]1[/TD]
[/TR]
[TR]
[TD]A9[/TD]
[TD="class: xl67, align: right"]1[/TD]
[/TR]
[TR]
[TD]A10[/TD]
[TD="class: xl68, align: right"]0[/TD]
[/TR]
[TR]
[TD]A11[/TD]
[TD="class: xl68, align: right"]0[/TD]
[/TR]
[TR]
[TD]A12[/TD]
[TD="class: xl68, align: right"]2[/TD]
[/TR]
[TR]
[TD]A13[/TD]
[TD="class: xl69, align: right"]0[/TD]
[/TR]
[TR]
[TD]A14[/TD]
[TD="class: xl69, align: right"]2[/TD]
[/TR]
[TR]
[TD]A15[/TD]
[TD="class: xl69, align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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