Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default text combinations

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default text combinations

Are the 5 strings all in one cell separated by commas or each string in its'
own cell from column A to E, or A1 to A5?

Mike F
"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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default text combinations

They are each in separate cells, colums A to E.

Thanks!

"Mike Fogleman" wrote:

Are the 5 strings all in one cell separated by commas or each string in its'
own cell from column A to E, or A1 to A5?

Mike F
"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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default text combinations

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default text combinations

Oops, I replied before I double-checked the figures.

This doesn't quite work right. It lists each text string five times in a
row, then goes to the next string.

Which works for one column, but the second should do one of each and then
repeat that sequence again.

The way it works it lists the same variant (i.e., KMNN/KDNN) five times in a
row, then another variant (KONN/OPNN) five times in a row.

Thanks anyway.

"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




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default text combinations

I played around with this, and by changing the "i" in this:

cells(rw,2).Value = varr2(i)


to "j", it worked like a charm.

Thanks!

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




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default text combinations

My typo - sorry for the confusion.

--
Regards,
Tom Ogilvy

"Allison" wrote in message
...
I played around with this, and by changing the "i" in this:

cells(rw,2).Value = varr2(i)


to "j", it worked like a charm.

Thanks!

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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing various combinations of text and returning only a number inexcel Waheed Ajouhaar Excel Discussion (Misc queries) 3 December 17th 09 01:33 PM
Combinations Balaji Excel Worksheet Functions 5 October 28th 07 03:22 PM
Problems: rounding & formatting Text/# combinations nastech Excel Discussion (Misc queries) 1 July 5th 06 06:51 PM
Problems: rounding & formatting Text/# combinations nastech Excel Discussion (Misc queries) 1 July 5th 06 06:51 PM
Combinations Chris_t_2k5 Excel Discussion (Misc queries) 2 February 7th 06 10:36 AM


All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"