random card draw

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Hi,

I'd like to have a spreadsheet where a1 is the 1st random draw of a 52 card
deck, a2 was the 2nd random draw from a deck excluding a1, etc, etc

any help?


chuck c
 
Try this set-up:

a. Put: =rand() and copy over a 13 row x 4 col grid (say in E1:H13)
b. Name this range, say: Cards1

c. Select another 13 x 4 grid (say in E15:H27)
d. Click inside the formula box and put: =RANK(Cards1,Cards1)
e. Hold down Ctrl+Shift, press Enter (it's an array formula)
f. Name this range, say: Cards2

g. Number 1,2,3,4 ... 52 down A1:A52
h. In C1:C52, put in the 52 card names, viz:

Diamond1 - Diamond13
Club1 - Club13
Clover1 - Clover 13
Heart1 - Heart 13

i. Select A1:C52, and name this range: Cards3

j. Put in B1:
=VLOOKUP(OFFSET(Cards2,INT((A1-1)/COLUMNS(Cards2)),MOD(A1-1,COLUMNS(Cards2))
,1,1),Cards3,3,FALSE)

Copy the formula down B1:B52

B1:B52 will give you a random shuffle of all 52 cards each time you press F9
to recalculate
 
Back
Top