Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
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
if alpha character samuel Excel Discussion (Misc queries) 4 December 17th 08 03:22 AM
Assigning a numeric value to a alpha character Johnny D[_2_] Excel Programming 1 February 3rd 06 07:04 PM
Parsing a alpha character out of a cell Lram Excel Worksheet Functions 7 October 17th 05 10:56 PM
Numerical grade to Alpha character capecrusader Excel Discussion (Misc queries) 6 August 20th 05 02:02 PM
Increment Alpha Character Dan Excel Programming 4 June 3rd 04 07:32 PM


All times are GMT +1. The time now is 07:35 AM.

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

About Us

"It's about Microsoft Excel"