Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How Do I Generate a Report Showing All Possible Combinations of Data in Excel or Access

Avatar of BritishVB
BritishVBFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft AccessMicrosoft ExcelVB Script
7 Comments1 Solution847 ViewsLast Modified:
Hi Guys, I'm stumped and need an answer quick - am really hoping you can help??!!

I am not fussed whether I end up working in Excel or Access - but I can't use any other application so...

I have a table containing data values and I need to create a second table, or report, showing all possible permutations or combinations of the data items. For example

Colour                     Size                       Packaging
Red                         Large                     Bubblewrap
Blue                        Medium                  Foil
Yellow                    Small                     Shrinkwrap

This table could contain multiple columns and multiple rows.

The automated output I am looking for would show

Red | Large | Bubblewrap
Red | Medium | Bubblewrap
Red | Small | Bubblewrap
Red | Large | Foil
Red | Medium | Foil
Red | Small | Foil
Red | Large | Shrinkwrap
Red | Medium | Shrinkwrap
Red | Small | Shrinkwrap
Blue | Large | Bubblewrap
Blue | Medium | Bubblewrap
Blue | Small | Bubblewrap
Blue | Large | Foil
Blue | Medium | Foil
Blue | Small | Foil
etc, for all possible combinations.

I have used VBA in the past, so wouldn't struggle if I had to use it again.

Any suggestions? Please????
Avatar of adraughn
adraughnFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answers