+ Reply to Thread
Results 1 to 6 of 6

Need help adapting a formula to generate a random array of non-repeating numbers

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    17

    Need help adapting a formula to generate a random array of non-repeating numbers

    Greetings Excel Users!

    I need to create an Excel formula to generate an array of 10 numbers, from 1 to 10, without any duplicates. I found a couple of examples to do something similar, however, I have had trouble adapting these examples to my situation.

    Here is a link to the example that I followed: http://answers.microsoft.com/en-us/m...c9daafe?page=1

    Please Login or Register  to view this content.
    Based on the example above, I am able to generate the random, non-repeating list of numbers from 1 to 10 like I want. However, this formula goes down column A, and I need it to go across row 2 instead. I've been playing around with it for the last 4 hours and I can't figure out how to make it fit my needs.

    I've attached an Excel workbook with the formula, as well as an example of how I want to the data to ultimately look.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,367

    Re: Need help adapting a formula to generate a random array of non-repeating numbers

    Maybe like this?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need help adapting a formula to generate a random array of non-repeating numbers

    Quote Originally Posted by azumi View Post
    Maybe like this?
    Azumi, thank you very much for taking a look at this. You solution does exactly what I asked for! However, I forget to mention that I ultimately want to take this formula and "drag it down" to essentially create 1000 rows, each row with numbers 1-10, but in a different random order, and no repeating numbers within a single row.

    I tried to adapt your formula to allow me to copy it down, but I was once again not able to make it work.

  4. #4
    Registered User
    Join Date
    01-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need help adapting a formula to generate a random array of non-repeating numbers

    Quote Originally Posted by azumi View Post
    Maybe like this?
    Azumi, thank you very much for taking a look at this. You solution does exactly what I asked for! However, I forget to mention that I ultimately want to take this formula and "drag it down" to essentially create 1000 rows, each row with numbers 1-10, but in a different random order, and no repeating numbers within a single row.

    I tried to adapt your formula to allow me to copy it down, but I was once again not able to make it work.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need help adapting a formula to generate a random array of non-repeating numbers

    Quote Originally Posted by azumi View Post
    maybe like this?
    https://www.excelforum.com/showthread.php?t=1040120



    ---------------------
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Need help adapting a formula to generate a random array of non-repeating numbers

    One very small modification seems to work. Using azumi's file change the formula in C2 to read as follows then use the array entered formula protocol (from the edit mode press Ctrl, Shift and Enter simultaneously), copy the formula across to L2 and then down 1000 rows:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Note that the only change made is from ...COUNTIF($B$2:B2... to ...COUNTIF($B2:B2...
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Replies: 9
    Last Post: 05-03-2016, 04:43 PM
  2. [SOLVED] Generate static random numbers within formula
    By SteveTheFish in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-10-2015, 02:51 AM
  3. [SOLVED] How to generate non-repeating random numbers in a column wihtout VB
    By luv2glyd in forum Excel General
    Replies: 4
    Last Post: 02-16-2015, 12:43 AM
  4. Formula to generate unique random numbers?!?
    By aims in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-07-2013, 03:14 PM
  5. How to generate non-repeating random numbers
    By luv2glyd in forum Excel General
    Replies: 2
    Last Post: 09-24-2010, 12:16 PM
  6. using excel generate random numbers 1 to 52 without repeating
    By Norman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2006, 02:25 AM
  7. [SOLVED] How do I generate random, non-repeating numbers that don't change?
    By bsquared0 in forum Excel General
    Replies: 1
    Last Post: 07-30-2005, 12:05 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