+ Reply to Thread
Results 1 to 4 of 4

Macro to pick random unique numbers from lsit

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    88

    Macro to pick random unique numbers from lsit

    I have a list of around 200 unique ticket numbers in an excel file.
    Now I want to pick randomly 60 unique ticket numbers from the list by VBA Code
    Please guide me how can i do that

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to pick random unique numbers from lsit

    You could number them from 1 to 200 and then Randomly pick 60 numbers between 1 and 200 ensuring, of course against duplicates by putting them in an array perhaps?

    Something like this:

    Please Login or Register  to view this content.
    Last edited by xladept; 12-15-2012 at 04:26 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: Macro to pick random unique numbers from lsit

    Thanks Friend for your help :-)

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to pick random unique numbers from lsit

    You're welcome!

+ 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