View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default How to create a list of permutations and combinations?

Actually it seems to me that the first letter could be anything from A to Z
and so on. So how do you determine what the possible choices are at any
given position. Also, I don't follow how the second line fits into the
problem B D K.....? Also, you say there are 64 permutations but then you say
some items can have 3 choices, in which case how do you come to 64?

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Malcolm" wrote:

I have a matrix, 6 columns x 2 rows, which contains letter codes. Example:

A C E R Q L
B D K S P N

Each column is a choice; that is, either A or B; either C or D, etc.

I need to create a list of all possible permutations.
There are 64 permutations, e.g.
ACERQL
ACERQN
ACERPL
ACERPN
etc.

The letters in my 12 cells sometimes change based on formulas elsewhere in
the document, so the list needs to change with them.

To make things even more complicated, some columns will sometimes have THREE
choices in them instead of two (again, changing based on formulas), so the
ideal answer would enable me to deal with those cases automatically.