Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
All possible Alpha character combonations
I am trying to render all the possible combonations of two sets of alpa
data. For example Price MGP Comfort Style would be compared to Price MGP Comfort Style and thus there are 6 possible combonations price, MGP price, comfort price, style MGP,comfort MGP, style comfort,style How could i do this in excel???? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
All possible Alpha character combonations
Both sets are always the same?
Sets are of the same length or can they be different lengths? Order of pairs doesn't matter ? Perhaps you can define your requirements (or the context) a bit more explicitly. Tim wrote in message oups.com... I am trying to render all the possible combonations of two sets of alpa data. For example Price MGP Comfort Style would be compared to Price MGP Comfort Style and thus there are 6 possible combonations price, MGP price, comfort price, style MGP,comfort MGP, style comfort,style How could i do this in excel???? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
All possible Alpha character combonations
For now I think both sets are always the same, thus the same length , and order of pairs doesn't matter. Tim Williams wrote: Both sets are always the same? Sets are of the same length or can they be different lengths? Order of pairs doesn't matter ? Perhaps you can define your requirements (or the context) a bit more explicitly. Tim wrote in message oups.com... I am trying to render all the possible combonations of two sets of alpa data. For example Price MGP Comfort Style would be compared to Price MGP Comfort Style and thus there are 6 possible combonations price, MGP price, comfort price, style MGP,comfort MGP, style comfort,style How could i do this in excel???? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
All possible Alpha character combonations
Assume the two sets are in A1:A4 and B1:B4
Sub ABD() Dim rw As Long, i As Long, j As Long rw = 0 For i = 1 To 4 For j = i + 1 To 4 If StrComp(Cells(i, 1), Cells(j, 1), _ vbTextCompare) < 0 Then rw = rw + 1 Cells(rw, "C") = Cells(i, 1) & ", " & Cells(j, 2) End If Next Next End Sub -- Regards, Tom Ogilvy wrote in message oups.com... For now I think both sets are always the same, thus the same length , and order of pairs doesn't matter. Tim Williams wrote: Both sets are always the same? Sets are of the same length or can they be different lengths? Order of pairs doesn't matter ? Perhaps you can define your requirements (or the context) a bit more explicitly. Tim wrote in message oups.com... I am trying to render all the possible combonations of two sets of alpa data. For example Price MGP Comfort Style would be compared to Price MGP Comfort Style and thus there are 6 possible combonations price, MGP price, comfort price, style MGP,comfort MGP, style comfort,style How could i do this in excel???? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
All possible Alpha character combonations
WOW THAT EXAXTLY WHAT I NEEDED! Thank you so much! I thought i would
be able to munipulate the script to adjust it to diffrent cell ranges in the sheet but i havent figured that out yet(vba rookie). Also how could i change it to be flexible and compare anyehere from 1 to 10 items in each set, becasue the data inputed will vary from 1 to 10 items?? Thank you so much for your help!!!!!!!! Tom Ogilvy wrote: Assume the two sets are in A1:A4 and B1:B4 Sub ABD() Dim rw As Long, i As Long, j As Long rw = 0 For i = 1 To 4 For j = i + 1 To 4 If StrComp(Cells(i, 1), Cells(j, 1), _ vbTextCompare) < 0 Then rw = rw + 1 Cells(rw, "C") = Cells(i, 1) & ", " & Cells(j, 2) End If Next Next End Sub -- Regards, Tom Ogilvy wrote in message oups.com... For now I think both sets are always the same, thus the same length , and order of pairs doesn't matter. Tim Williams wrote: Both sets are always the same? Sets are of the same length or can they be different lengths? Order of pairs doesn't matter ? Perhaps you can define your requirements (or the context) a bit more explicitly. Tim wrote in message oups.com... I am trying to render all the possible combonations of two sets of alpa data. For example Price MGP Comfort Style would be compared to Price MGP Comfort Style and thus there are 6 possible combonations price, MGP price, comfort price, style MGP,comfort MGP, style comfort,style How could i do this in excel???? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
if alpha character | Excel Discussion (Misc queries) | |||
Assigning a numeric value to a alpha character | Excel Programming | |||
Parsing a alpha character out of a cell | Excel Worksheet Functions | |||
Numerical grade to Alpha character | Excel Discussion (Misc queries) | |||
Increment Alpha Character | Excel Programming |