+ Reply to Thread
Results 1 to 6 of 6

Random number generation

  1. #1
    Registered User
    Join Date
    03-19-2021
    Location
    Nottingham, England
    MS-Off Ver
    office 365
    Posts
    28

    Random number generation

    Hi,

    I'm currently using the formula INDEX(UNIQUE(RANDARRAY(32,1,1,32,TRUE)),SEQUENCE(1)) to generate 32 numbers in the column of a worksheet. Works in a fashion but still produces duplicates. Does anyone know a way to avoid the duplicates? From what I can see it always involves manual interaction.

    Thanks

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,767

    Re: Random number generation

    I do not understand something...... You would like to generate 32 random numbers from pool of 32 numbers without duplicates?
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Random number generation

    Try:

    =IFERROR(LARGE(ROW($1:$32)*NOT(COUNTIF($A$1:A1, ROW($1:$32))), RANDBETWEEN(1,33-ROW(A1))),"")

    copied down.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    03-19-2021
    Location
    Nottingham, England
    MS-Off Ver
    office 365
    Posts
    28

    Re: Random number generation

    MBizarrely, it works on your attached sheet. mine kicks out dupes when i use the exact same formula in my own - :S thanks. I'll have a 2nd look to see what I'm doing wrong.

  5. #5
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,767

    Re: Random number generation

    Ahh, get it, 32 numbers in random order.
    Also:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    spilled automatically.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Random number generation

    Make sure it starts on row 2.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Random number generation
    By jas5432 in forum Excel General
    Replies: 6
    Last Post: 02-15-2014, 11:00 PM
  2. Random Number Generation
    By RalphJ in forum Excel General
    Replies: 1
    Last Post: 06-25-2010, 12:51 PM
  3. Random Number Generation
    By vioravis in forum Excel General
    Replies: 3
    Last Post: 02-27-2009, 08:39 PM
  4. Random number generation
    By Alan Davies in forum Excel General
    Replies: 3
    Last Post: 02-27-2006, 05:40 PM
  5. [SOLVED] Random Number Generation
    By MB06 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2006, 04:45 PM
  6. random number generation
    By scotjo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2006, 12:10 PM
  7. [SOLVED] random number generation
    By DSpec in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-03-2005, 09:05 AM
  8. [SOLVED] Random number generation
    By Stratuser in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2005, 09:06 AM

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