+ Reply to Thread
Results 1 to 5 of 5

using excel generate random numbers 1 to 52 without repeating

Hybrid View

  1. #1
    Norman
    Guest

    using excel generate random numbers 1 to 52 without repeating

    I want to shuffle a pack of playing cards using excel

  2. #2
    Heather Heritage
    Guest

    Re: 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" <Norman@discussions.microsoft.com> wrote in message
    news:39E1C765-4A15-4937-BE88-905BC56702A2@microsoft.com...
    > I want to shuffle a pack of playing cards using excel




  3. #3
    bplumhoff@gmail.com
    Guest

    Re: 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


  4. #4
    Franz Verga
    Guest

    Re: using excel generate random numbers 1 to 52 without repeating

    Nel post news:39E1C765-4A15-4937-BE88-905BC56702A2@microsoft.com
    *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



  5. #5
    Tushar Mehta
    Guest

    Re: using excel generate random numbers 1 to 52 without repeating

    In article <39E1C765-4A15-4937-BE88-905BC56702A2@microsoft.com>,
    Norman@discussions.microsoft.com 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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1