I am trying to program excel to list all possible combinations for 14 Items, The combinations only use ten of those items and must allow repeating. I know that this is a massive amount of data. nCr= ((n+r)-1)!/(r!)(n-1)!,
14C10=((14+10)-1))!/(10!)(14-1)!= 1,144,066 possible combinations. I want excel to display these combinations for me. For example I have 14 types of food
Apples (A), Bananas (B), Carrots (C), Dates (D), Eggplants (E), Figs (F), Grapes (G), Ham (H), Ice (I), Jam (J), Kiwis (K), Limes (L), Mangoes (M), and Nectarines (N) of which only ten are needed in each combination.
So in Column A, I want the choices A1=(A), A2= (B), A3= (C) and so on. In Column C I want each cell to hold the possible combination For example, Cell C1 could look like (A,A,B,C,C,D,E,F,G,H).
Any help you could give me in how to write this in VBA would be greatly appreciated.
14C10=((14+10)-1))!/(10!)(14-1)!= 1,144,066 possible combinations. I want excel to display these combinations for me. For example I have 14 types of food
Apples (A), Bananas (B), Carrots (C), Dates (D), Eggplants (E), Figs (F), Grapes (G), Ham (H), Ice (I), Jam (J), Kiwis (K), Limes (L), Mangoes (M), and Nectarines (N) of which only ten are needed in each combination.
So in Column A, I want the choices A1=(A), A2= (B), A3= (C) and so on. In Column C I want each cell to hold the possible combination For example, Cell C1 could look like (A,A,B,C,C,D,E,F,G,H).
Any help you could give me in how to write this in VBA would be greatly appreciated.