View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Allison Allison is offline
external usenet poster
 
Posts: 40
Default text combinations

Thanks Tom; worked great!

Allison

"Tom Ogilvy" wrote:

Sub GenCombo()
Dim varr1 as Variant, varr2 as Variant
Dim rw as Long, i as long, j as long
varr1 = Array("KMNN","KONN","RGNN","RONN","OONN")
varr2 = Array("KDNN","OPNN","OQNN","OTNN","WDNN")
rw = 1
for i = lbound(varr1) to ubound(varr1)
for j = lbound(varr2) to ubound(varr2)
cells(rw,1).Value = varr1(i)
cells(rw,2).Value = varr2(i)
rw = rw + 1
Next
Next
End sub

--
Regards,
Tom Ogilvy

"Allison" wrote in message
...
Excel XP, Windows 2000

I've searched through the group but don't see what I'm looking for.

I have two groups of 4-character text strings. Each group has five
different strings. I need to find out the possible combinations of one

from
group A and one from group B.

Example:

Group A: KMNN,KONN,RGNN,RONN,OONN
Group B: KDNN,OPNN,OQNN,OTNN,WDNN

One combination would be KMNN with KDNN. Another would be KMNN with OTNN,
and a third would be RGNN with OTNN.

How can I come up with a list of all possible combinations?

Thanks for your help.

Allison