ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   combination (https://www.excelbanter.com/excel-discussion-misc-queries/124852-combination.html)

combination?

combination
 
Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks

Bernard Liengme

combination
 
I went to Google and typed in: Excel combinations
I got just over 1 million hits
Try a few
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"combination?" wrote in message
...
Hello,

From a database, I would like to list a number of combinations. For
example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks




CLR

combination
 
If your base numbers were always 3 digits, it would be relatively easy to do
Data TextToColumns and separate them into 3 columns, and then put
CONCATENATION formulas in other cells along the same row to produce the
combinations you seek.......if this sounds like what you want, and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks


bybora

combination
 
Hello,

Combination is not in the meaning of combining things together. I mean the
combination in maths. As you know it is a way of calculating probability like
permutation.

Thanks.

"CLR" wrote:

If your base numbers were always 3 digits, it would be relatively easy to do
Data TextToColumns and separate them into 3 columns, and then put
CONCATENATION formulas in other cells along the same row to produce the
combinations you seek.......if this sounds like what you want, and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks


bybora

combination
 
Hello,

That is the problem. I have already tried a few of the top listings.
Anything more clearer from yourside on this topic? This combination is the
one in maths. A sub-topic of calculating probability like permutation.

Thanks.

"Bernard Liengme" wrote:

I went to Google and typed in: Excel combinations
I got just over 1 million hits
Try a few
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"combination?" wrote in message
...
Hello,

From a database, I would like to list a number of combinations. For
example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks





CLR

combination
 
Sorry, guess I mis-understood. I thought you HAD abc, and WANTED
ab,ac,ba,bc,ca,cb. I told you one way to get that. If that is not what
you're after, please give a couple more examples of what you HAVE and what
you WANT. Then perhaps someone can help more.........

Vaya con Dios,
Chuck, CABGx3




"bybora" wrote:

Hello,

Combination is not in the meaning of combining things together. I mean the
combination in maths. As you know it is a way of calculating probability like
permutation.

Thanks.

"CLR" wrote:

If your base numbers were always 3 digits, it would be relatively easy to do
Data TextToColumns and separate them into 3 columns, and then put
CONCATENATION formulas in other cells along the same row to produce the
combinations you seek.......if this sounds like what you want, and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks


Gord Dibben

combination
 

Excel has two functions........COMBIN and PERMUT

Try them.


Gord Dibben MS Excel MVP

On Wed, 10 Jan 2007 01:15:01 -0800, bybora
wrote:

Hello,

That is the problem. I have already tried a few of the top listings.
Anything more clearer from yourside on this topic? This combination is the
one in maths. A sub-topic of calculating probability like permutation.

Thanks.

"Bernard Liengme" wrote:

I went to Google and typed in: Excel combinations
I got just over 1 million hits
Try a few
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"combination?" wrote in message
...
Hello,

From a database, I would like to list a number of combinations. For
example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks






bybora

combination
 
Thanks for shedding some light on the matter. Here comes the example:
Column A
2
5
6
7
12
78
44

I would like excel to list me the combination from the database in columnA
for a given number. Combin (7,6) listing will be:
2 2 2 2 2 2 5
5 5 5 5 5 6 6
6 6 6 6 7 7 7
7 7 7 12 12 12 12
12 12 78 78 78 78 78
78 44 44 44 44 44 44

Thanks



"CLR" wrote:

Sorry, guess I mis-understood. I thought you HAD abc, and WANTED
ab,ac,ba,bc,ca,cb. I told you one way to get that. If that is not what
you're after, please give a couple more examples of what you HAVE and what
you WANT. Then perhaps someone can help more.........

Vaya con Dios,
Chuck, CABGx3




"bybora" wrote:

Hello,

Combination is not in the meaning of combining things together. I mean the
combination in maths. As you know it is a way of calculating probability like
permutation.

Thanks.

"CLR" wrote:

If your base numbers were always 3 digits, it would be relatively easy to do
Data TextToColumns and separate them into 3 columns, and then put
CONCATENATION formulas in other cells along the same row to produce the
combinations you seek.......if this sounds like what you want, and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks


CLR

combination
 
Maybe this macro will help...........

Sub Combinations()
'With data in A1:A7, will place combinations in B1:H6

Range("b1:H6").ClearContents 'clears output range of old data

Columns("A:A").Select
Selection.Copy
Columns("B:H").Select
ActiveSheet.Paste
Range("B1").Select
Application.Goto Reference:="R65000C2"
Selection.End(xlUp).Select
Application.CutCopyMode = False
Selection.ClearContents
Range("C6").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("D5").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("E4").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("F3").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("G2").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("H1").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
End Sub

Vaya con Dios,
Chuck, CABGx3



"bybora" wrote:

Thanks for shedding some light on the matter. Here comes the example:
Column A
2
5
6
7
12
78
44

I would like excel to list me the combination from the database in columnA
for a given number. Combin (7,6) listing will be:
2 2 2 2 2 2 5
5 5 5 5 5 6 6
6 6 6 6 7 7 7
7 7 7 12 12 12 12
12 12 78 78 78 78 78
78 44 44 44 44 44 44

Thanks



"CLR" wrote:

Sorry, guess I mis-understood. I thought you HAD abc, and WANTED
ab,ac,ba,bc,ca,cb. I told you one way to get that. If that is not what
you're after, please give a couple more examples of what you HAVE and what
you WANT. Then perhaps someone can help more.........

Vaya con Dios,
Chuck, CABGx3




"bybora" wrote:

Hello,

Combination is not in the meaning of combining things together. I mean the
combination in maths. As you know it is a way of calculating probability like
permutation.

Thanks.

"CLR" wrote:

If your base numbers were always 3 digits, it would be relatively easy to do
Data TextToColumns and separate them into 3 columns, and then put
CONCATENATION formulas in other cells along the same row to produce the
combinations you seek.......if this sounds like what you want, and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks


bybora

combination
 
Hey that was amazing. one last thing. This was a solution for combination
(7,6) in fact. Because from A row comes 7 entries and you managed to list the
7 combinations in b:h

okey what if i need combination (8,6) ? In this case I will have 8 entries
downwards in col A and the result of 28 different combinations has o be
listed from b to ....

This willbe my last question. Thanks in advance!

"CLR" wrote:

Maybe this macro will help...........

Sub Combinations()
'With data in A1:A7, will place combinations in B1:H6

Range("b1:H6").ClearContents 'clears output range of old data

Columns("A:A").Select
Selection.Copy
Columns("B:H").Select
ActiveSheet.Paste
Range("B1").Select
Application.Goto Reference:="R65000C2"
Selection.End(xlUp).Select
Application.CutCopyMode = False
Selection.ClearContents
Range("C6").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("D5").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("E4").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("F3").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("G2").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("H1").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
End Sub

Vaya con Dios,
Chuck, CABGx3



"bybora" wrote:

Thanks for shedding some light on the matter. Here comes the example:
Column A
2
5
6
7
12
78
44

I would like excel to list me the combination from the database in columnA
for a given number. Combin (7,6) listing will be:
2 2 2 2 2 2 5
5 5 5 5 5 6 6
6 6 6 6 7 7 7
7 7 7 12 12 12 12
12 12 78 78 78 78 78
78 44 44 44 44 44 44

Thanks



"CLR" wrote:

Sorry, guess I mis-understood. I thought you HAD abc, and WANTED
ab,ac,ba,bc,ca,cb. I told you one way to get that. If that is not what
you're after, please give a couple more examples of what you HAVE and what
you WANT. Then perhaps someone can help more.........

Vaya con Dios,
Chuck, CABGx3




"bybora" wrote:

Hello,

Combination is not in the meaning of combining things together. I mean the
combination in maths. As you know it is a way of calculating probability like
permutation.

Thanks.

"CLR" wrote:

If your base numbers were always 3 digits, it would be relatively easy to do
Data TextToColumns and separate them into 3 columns, and then put
CONCATENATION formulas in other cells along the same row to produce the
combinations you seek.......if this sounds like what you want, and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of combinations. For example
dtabase is a,b,c combination 3,2 listing will be ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks


CLR

combination
 
Sub Combinations86()
'With data in A1:A8, will place combinations in B1:AC6

Range("b1:ac8").ClearContents 'clears output range of old data
Range("A1:A8").Select
Selection.Copy
Range("B1:AC1").Select
ActiveSheet.Paste

Range("B7:B8").Select
Selection.Delete Shift:=xlUp
Range("C6,C8").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("D6:D7").Select
Selection.Delete Shift:=xlUp
Range("E5:E6").Select
Selection.Delete Shift:=xlUp
Range("F5,F7").Select
Selection.Delete Shift:=xlUp
Range("G5,G8").Select
Selection.Delete Shift:=xlUp
Range("H4:H5").Select
Selection.Delete Shift:=xlUp
Range("I6,I4").Select
Selection.Delete Shift:=xlUp
Range("J4,J7").Select
Selection.Delete Shift:=xlUp
Range("k4,k8").Select
Selection.Delete Shift:=xlUp
Range("l3:l4").Select
Selection.Delete Shift:=xlUp
Range("m3,m5").Select
Selection.Delete Shift:=xlUp
Range("n3,n6").Select
Selection.Delete Shift:=xlUp
Range("o3,o7").Select
Selection.Delete Shift:=xlUp
Range("p3,p8").Select
Selection.Delete Shift:=xlUp
Range("q2:q3").Select
Selection.Delete Shift:=xlUp
Range("r2,r4").Select
Selection.Delete Shift:=xlUp
Range("s2,s5").Select
Selection.Delete Shift:=xlUp
Range("t2,t6").Select
Selection.Delete Shift:=xlUp
Range("u2,u7").Select
Selection.Delete Shift:=xlUp
Range("v2,v8").Select
Selection.Delete Shift:=xlUp
Range("w1:w2").Select
Selection.Delete Shift:=xlUp
Range("x1,x3").Select
Selection.Delete Shift:=xlUp
Range("y1,y4").Select
Selection.Delete Shift:=xlUp
Range("z1,z5").Select
Selection.Delete Shift:=xlUp
Range("aa1,aa6").Select
Selection.Delete Shift:=xlUp
Range("Ab1,Ab7").Select
Selection.Delete Shift:=xlUp
Range("Ac1,Ac8").Select
Selection.Delete Shift:=xlUp

End Sub

Vaya con Dios,
Chuck, CABGx3




"bybora" wrote in message
...
Hey that was amazing. one last thing. This was a solution for combination
(7,6) in fact. Because from A row comes 7 entries and you managed to list

the
7 combinations in b:h

okey what if i need combination (8,6) ? In this case I will have 8 entries
downwards in col A and the result of 28 different combinations has o be
listed from b to ....

This willbe my last question. Thanks in advance!

"CLR" wrote:

Maybe this macro will help...........

Sub Combinations()
'With data in A1:A7, will place combinations in B1:H6

Range("b1:H6").ClearContents 'clears output range of old data

Columns("A:A").Select
Selection.Copy
Columns("B:H").Select
ActiveSheet.Paste
Range("B1").Select
Application.Goto Reference:="R65000C2"
Selection.End(xlUp).Select
Application.CutCopyMode = False
Selection.ClearContents
Range("C6").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("D5").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("E4").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("F3").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("G2").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("H1").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
End Sub

Vaya con Dios,
Chuck, CABGx3



"bybora" wrote:

Thanks for shedding some light on the matter. Here comes the example:
Column A
2
5
6
7
12
78
44

I would like excel to list me the combination from the database in

columnA
for a given number. Combin (7,6) listing will be:
2 2 2 2 2 2 5
5 5 5 5 5 6 6
6 6 6 6 7 7 7
7 7 7 12 12 12 12
12 12 78 78 78 78 78
78 44 44 44 44 44 44

Thanks



"CLR" wrote:

Sorry, guess I mis-understood. I thought you HAD abc, and WANTED
ab,ac,ba,bc,ca,cb. I told you one way to get that. If that is not

what
you're after, please give a couple more examples of what you HAVE

and what
you WANT. Then perhaps someone can help more.........

Vaya con Dios,
Chuck, CABGx3




"bybora" wrote:

Hello,

Combination is not in the meaning of combining things together. I

mean the
combination in maths. As you know it is a way of calculating

probability like
permutation.

Thanks.

"CLR" wrote:

If your base numbers were always 3 digits, it would be

relatively easy to do
Data TextToColumns and separate them into 3 columns, and then

put
CONCATENATION formulas in other cells along the same row to

produce the
combinations you seek.......if this sounds like what you want,

and if you
need help with it, post back.

Vaya con Dios,
Chuck, CABGx3



"combination?" wrote:

Hello,

From a database, I would like to list a number of

combinations. For example
dtabase is a,b,c combination 3,2 listing will be

ab,ac,ba,bc,ca,cb.
Is there a way to do it?

Thanks





All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com