Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Norman
 
Posts: n/a
Default using excel generate random numbers 1 to 52 without repeating

I want to shuffle a pack of playing cards using excel
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Heather Heritage
 
Posts: n/a
Default using excel generate random numbers 1 to 52 without repeating

Excel has no hands - would you care to elaborate?! Are you after 52 cells
(or 54 with 2 jokers) each containing a different value of card?
"Norman" wrote in message
...
I want to shuffle a pack of playing cards using excel



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Franz Verga
 
Posts: n/a
Default using excel generate random numbers 1 to 52 without repeating

Nel post
*Norman* ha scritto:

I want to shuffle a pack of playing cards using excel



You can use these formulas from Ivano Chiappa, a very smart guy on
microsoft.public.it.office.excel newsgroup:

In D1 put:

=INT(RAND()*(last-first+1))+first

while in D2 put as an arry formula (i.e. with Ctrl + Shift + Enter instead
of Enter):

=INDEX(LARGE(IF(NOT(ISERROR(MATCH(ROW(INDIRECT("A" &first&":A"&last)),$D$1:D1,0))),0,ROW(INDIRECT("A" &first&":A"&last))),ROW(INDIRECT("A1:A"&last-first))),INT(RAND()*(last-first+1-ROW(A1))))

then you have to copy down till D52 (or D54 if you have also 2 jokers)

where first mean the lowst number, in your case is 1, while last mean your
highest value, so 52 or 54 if you have also 2 jokers

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tushar Mehta
 
Posts: n/a
Default using excel generate random numbers 1 to 52 without repeating

In article ,
says...
I want to shuffle a pack of playing cards using excel

For several different options see
Random Selection
http://www.tushar-mehta.com/excel/ne...ion/index.html

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default using excel generate random numbers 1 to 52 without repeating

Hello,

I suggest to take my UDF UniqRandInt from www.sulprobil.com.

It will help you even if you have two card decks (=104 cards) and if
each player can get card number 1..54 twice (but not more often!).

Regards,
Bernd

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
How do I get excel to generate Random nos for my data? GC Excel Worksheet Functions 2 June 1st 06 06:22 PM
How can I generate random characters in Excel Tayo Excel Discussion (Misc queries) 5 April 7th 06 02:07 PM
Can I create a random order within a series of numbers in Excel? Dimtrax Excel Worksheet Functions 2 November 9th 05 03:40 PM
Generate random numbers between two values and with a given mean pinosan Excel Worksheet Functions 2 March 7th 05 02:04 PM


All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"