View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Producing a list of all possible combinations

Permutation is your keyword here.

Try this post by Leo Heuser

http://groups.google.co.nz/groups?se...&output=gplain

Rob


"Mike" wrote in message
...
Hello all,

Man, am I stuck. I need to write some VB code that will
take answers to a questionnaire and produce a spreadsheet
listing every possible combination of answers. For
example, there are three questions, each with three
answers: a, b, or c. I need the output to be:

a a a
b a a
c a a
a b a
a c a
a a b
etc...

Can anybody think of a way to make this happen?

I appreciate any and all help.

Thanks in advance and have a great one,

Mike