Combination Help

dramos77

New Member
Joined
Aug 29, 2017
Messages
3
I have a sheet with 8 columns and 5 unique words in each column - 1 word per cell. How can I generate all of the possible combinations by taking only 1 word from each column to generate a lost of 8 words. Is this even possible? I am above average with basic excel but have not used macros or anything else.
Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Welcome to the forum.

You do realize that will generate 390625 combinations? What will you do with them all? Far too many to eyeball.

But if you really want, it's possible to do it, with a macro, or even just formulas. For example, here's a link to a thread with a macro that does almost exactly what you want:

Modify a code to run all possible combinations

This concatenates all the words into a single cell. I assume you'd want them separated by commas, or in different cells. Let me know how you want the results displayed, and I can customize something.
 
Upvote 0
Hi and thanks, I have below a layout of what I am starting with. I would like to get different combinations by taking only one word from each column, in order, to get a result of different words. Is this possible? Would that narrow it down from 30,000?

aro
alu
djh
mev
jho
lmi
dad
jla
mry
dpr
lbe
dmu
jaj
icr
lfi
ede
kco
tta
abrjne
gta
dwo
mcr
rco
dca
cpa
mc
dfr
gol
tmo
dho
jre
dpa
rwi
ema
tpr
mbr
cmc
swa
mly
aco

<tbody>
</tbody>
 
Upvote 0
I still feel like I don't understand what you want. But you can try the macro and see how well it works for you and report back.

Open a new workbook. Press Alt-F11 to open the VBA editor. From the menu, select Insert > Module. Go to the link I gave you in post #2 , and copy the code from post #1 of that thread into the VBA page that just opened. Now go back to Excel, and paste your starting layout onto Sheet1. Make sure you have a Sheet2. Then with Sheet1 showing, press Alt-F8 to open the macro selector, choose Permute and click Run. Your list should now be on Sheet2.

But based on what I see, you'll still get 390,625 combinations. Let me know if that's what you want.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,820
Members
449,049
Latest member
cybersurfer5000

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