+ Reply to Thread
Results 1 to 4 of 4

Generate random numbers with no repeats with a Dynamic Entry

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    NC
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Generate random numbers with no repeats with a Dynamic Entry

    I have not had much luck trying to figure out how to generate a range of random numbers based on a dynamic value.

    Let's say I have Coulmn F1:F1000 with the following data:

    =RAND()

    In D1, I want to enter a value between 1 and 1000, which would be my dynamic entry field: Will Use 251 as a example in D1

    In column A, A1-A251 would be popluated with Random numbers per row.

    What formula do I need to use for a single column output in "A" of random numbers?

    I saw a similar posting - but it was based on two rows of random numbers. They pasted the following in A1 - 1000:

    =IF(ROW()-ROW(A$1)+1>$D$1/2,"",RANK(OFFSET($E$1,ROW()-ROW(A$1)+(COLUMN()-COLUMN($A1))*($D$1/2),),$E$1:INDEX($E$1:$E$1000,$D$1)))


    http://www.excelforum.com/excel-gene...o-repeats.html

    Thanks in advance,
    R

  2. #2
    Registered User
    Join Date
    01-27-2010
    Location
    NC
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Generate random numbers with no repeats with a Dynamic Entry

    Does anyone have any ideas on this one?

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Generate random numbers with no repeats with a Dynamic Entry

    why the column f?
    just put in column a starting a1
    =if(row()>$d$1,"",rand())
    its unlikely you'll get duplicates
    but
    in b1 put
    =IF(MAX(FREQUENCY(A:A,A:A))>1,"try again","no dupes")
    and just hit f9 to recalculate if you do
    Attached Files Attached Files
    Last edited by martindwilson; 03-21-2010 at 08:48 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Generate random numbers with no repeats with a Dynamic Entry

    heres another with a random order between 1 and whatevers in d1 inclusive
    Attached Files Attached Files

+ 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