Listing out combinations and extracting data from the list

Listing out combinations and extracting data from the list

• Wednesday, January 12, 2011 7:31 PM

Hello all,

I am trying to create a list of combinations.  I am using this for analyzing the game of poker.  I am looking to get the combinations of 5 cards from a deck of 52 cards.  In my excel 2010, I know I can use the formula =combin(52,5) to come up with the correct answer of 2,598,960 combinations.  Note that I use "combin" instead of "permut" because the order doesn't matter, just the end result.

Now, the question is, is there a way to list out all 2,598,960 combinations?  For instance on one sheet, in each cell, list a different combination.  Such as:  5d 6c 9h Ah As (the number or capital letter being the rank and the lower-case letter being suit)

THEN, once I can get excel to list out all of the 2,598,960 combinations, I need to extract data from the list by filtering it out into hands that are of a specific rank.  Such as two pair, flush, full house, etc.  (in the 5d 6c 9h Ah As example, it would be listed as a pair of Aces)

How can this be done?  Thanks in advance.

All Replies

• Friday, January 14, 2011 6:40 PM

I am still looking for a possible solution.  Any help would be greatly appreciated!
• Saturday, January 15, 2011 1:14 AM

Excel 2010 Tables
List all 792 hands of a 12 card deck.
Some macros cribbed.
No filtering attempted.
http://c3017412.cdn.cloudfiles.rackspacecloud.com/01_14_11.xlsm
If you get *.zip, don't unzip, just rename *.xlsm
• Monday, January 17, 2011 8:58 PM

That isn't what I am looking for.  Or at least, I haven't figured out how I can transform it to make it useful for what I am looking for.