Generate all possible combinations from three data sets?

F

Flamikey

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
 
M

Myrna Larson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top