Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Generate all possible combinations from three data sets?
I want to build a table that lists all possible Blackjack initial han combinations with a dealer and one player. This means I am onl looking for the first 3 cards and I am making the assumption there is full deck. So I have 3 sets of {2,3,4,5,6,7,8,9,10,J,Q,K,A} and ther should be 2,197 possible combinations (suits are not considered). I there an easy formula to generate all of the possible 2,197 hands? Thanks -- Flamike ----------------------------------------------------------------------- Flamikey's Profile: http://www.excelforum.com/member.php...nfo&userid=461 View this thread: http://www.excelforum.com/showthread.php?threadid=26779 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Generate all possible combinations from three data sets?
You want a permutation generator.
You could start with the one on J-Walk's site: http://j-walk.com/ss/excel/tips/tip46.htm With some work you might be able to get what you want. -- Rob van Gelder - http://www.vangelder.co.nz/excel "Flamikey" wrote in message ... I want to build a table that lists all possible Blackjack initial hand combinations with a dealer and one player. This means I am only looking for the first 3 cards and I am making the assumption there is a full deck. So I have 3 sets of {2,3,4,5,6,7,8,9,10,J,Q,K,A} and there should be 2,197 possible combinations (suits are not considered). Is there an easy formula to generate all of the possible 2,197 hands? Thanks. -- Flamikey ------------------------------------------------------------------------ Flamikey's Profile: http://www.excelforum.com/member.php...fo&userid=4612 View this thread: http://www.excelforum.com/showthread...hreadid=267790 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Generate all possible combinations from three data sets?
You need VBA for this.
Go to the Google news group search, and get the message posted by me (Myrna Larson) on Aug 31, 2004 in the microsoft.public.excel.worksheet.functions group. It includes the necessary VBA code and instructions as to how to use it. On your worksheet, you will need to set up a 54-cell vertical range on the worksheet with C in the 1st cell, 3 in the 2nd, and your list of 52 cards below, i.e. 4 copies of the list you included in your message. The hands will be listed on a new worksheet. I calculate 22,100 combinations of 52 things taken 3 at a time. That's the number of hands, assuming that suit DOES matter. Since it doesn't matter to you, you can use Data/Filter/Advanced Filter on the list of 22,100 hands to get the unique ones. On Fri, 8 Oct 2004 16:45:07 -0500, Flamikey wrote: I want to build a table that lists all possible Blackjack initial hand combinations with a dealer and one player. This means I am only looking for the first 3 cards and I am making the assumption there is a full deck. So I have 3 sets of {2,3,4,5,6,7,8,9,10,J,Q,K,A} and there should be 2,197 possible combinations (suits are not considered). Is there an easy formula to generate all of the possible 2,197 hands? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to create a macro in excel so that it can generate a list ofunique records using all permutations and combinations of the data in eachrow ad column | Excel Discussion (Misc queries) | |||
Combinations in a string of data | Excel Worksheet Functions | |||
Excel graph 3 sets of data. 2 sets as lines 1 as column? | Charts and Charting in Excel | |||
How to generate sets of random numbers without having duplicates | Excel Worksheet Functions | |||
generate a random number and use if function to generate new data | Excel Worksheet Functions |