+ Reply to Thread
Results 1 to 3 of 3

Random date in order without duplicates

Hybrid View

  1. #1
    Registered User
    Join Date
    07-01-2009
    Location
    Seoul, South Korea
    MS-Off Ver
    Excel 2003
    Posts
    21

    Random date in order without duplicates

    You guys have been so helpful so far, I swear its spoiling me.

    Is there a way to create a list of random dates (within a range) in descending order without duplicates without using a macro? I've already got the random dates function set up as such:

    =TEXT($A$29+INT(RAND()*($A$30-$A$29)),"yyyy/mm/dd")
    but cant figure out a good way to setup non duplicates and in order.

    Again appreciate any help.

    Thanks

  2. #2
    Registered User
    Join Date
    03-08-2007
    Posts
    93

    Re: Random date in order without duplicates

    Try the following

    Assume A4 is the first cell you want to populate:

    =TEXT(INT(MAX($A$30-INT(RAND()/3*($A$30-$A$29)),1)),"yyyy/mm/dd")
    For Cell A5 and below, use

    =TEXT(INT(A4-MAX(INT(RAND()/3*(A4-$A$29)),1)),"yyyy/mm/dd")
    The max(xx,1) function ensures at least one date between the numebrs, and the rand()/3 assures you won't take up too large a percentage of the time remaining with any given date in the range.

    Hope this helps

    SAE

  3. #3
    Registered User
    Join Date
    07-01-2009
    Location
    Seoul, South Korea
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Random date in order without duplicates

    Thanks a bunch seckert! exactly what I needed.

+ 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