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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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?

[TABLE="width: 500"]
<tbody>[TR]
[TD]aro
[/TD]
[TD]alu
[/TD]
[TD]djh
[/TD]
[TD]mev
[/TD]
[TD]jho
[/TD]
[TD]lmi
[/TD]
[TD]dad
[/TD]
[TD]jla
[/TD]
[/TR]
[TR]
[TD]mry
[/TD]
[TD]dpr
[/TD]
[TD]lbe
[/TD]
[TD]dmu
[/TD]
[TD]jaj
[/TD]
[TD]icr
[/TD]
[TD]lfi
[/TD]
[TD]ede
[/TD]
[/TR]
[TR]
[TD]kco
[/TD]
[TD]tta
[/TD]
[TD]abrjne
[/TD]
[TD]gta
[/TD]
[TD]dwo
[/TD]
[TD]mcr
[/TD]
[TD]rco
[/TD]
[TD]dca
[/TD]
[/TR]
[TR]
[TD]cpa
[/TD]
[TD]mc
[/TD]
[TD]dfr
[/TD]
[TD]gol
[/TD]
[TD]tmo
[/TD]
[TD]dho
[/TD]
[TD]jre
[/TD]
[TD]dpa
[/TD]
[/TR]
[TR]
[TD]rwi
[/TD]
[TD]ema
[/TD]
[TD]tpr
[/TD]
[TD]mbr
[/TD]
[TD]cmc
[/TD]
[TD]swa
[/TD]
[TD]mly
[/TD]
[TD]aco
[/TD]
[/TR]
</tbody>[/TABLE]
 
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,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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