+ Reply to Thread
Results 1 to 4 of 4

Generate a random number

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    3

    Generate a random number

    I think this is a rather unique request. I am creating work order numbers. I want the numbers to be random (so numbers can't be gathered in advance) and also unique. I would also only like the number to generate when the cell is entered. The numbers can be any 6 digit number.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Generate a random number

    Welcome to the forum.

    "Random" and "unique" are mutually exclusive. Generating a unque six-digit number would require access to all previously generated numbers.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-18-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Generate a random number

    Can I approach it from this angle? Create a list of numbers to pick from. Say 1 to 3000. Once a number is selected, delete it from list

  4. #4
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Generate a random number

    Put this in your sheet module:

    Please Login or Register  to view this content.
    Last edited by Whizbang; 11-21-2011 at 06:05 PM.

+ 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