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
VB ScriptMicrosoft ExcelMicrosoft Access
7 Comments2 Solutions847 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????

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

Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros