+ Reply to Thread
Results 1 to 7 of 7

Random number generator question

  1. #1
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Random number generator question

    So i have a sheet that i want to generate a given number of random numbers between a range every time i go in to the sheet. I am able to create the min and the max for thesis number but i cannot figure out how to make it list the qty of numbers. I have attached a sample sheet.

    Also trying to figure out a formula to list all of the outliers for the set of data created.

    Thanks in advance for your help.


    Los
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Random number generator question

    In A1 and filled down
    =IF(ROW()>$D$1,"",RANDBETWEEN($D$2,$D$3))

    Then you'll need to adjust the range in each of your formulas in D5:D9
    Change A1:A56 to A1:INDEX(A:A,$D$1)

  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 2403
    Posts
    44,135

    Re: Random number generator question

    You were so close:

    =IF(ROWS(A$1:A1)<=$D$1,RANDBETWEEN($D$2,$D$3),"")

    in A1, copied down. Changing the ranges of the statistcal rows is not required, but they should all go to the same row...
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 06-06-2017 at 10:02 AM.
    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
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Random number generator question

    Hi Losguapos,

    See the attached for a CountIf function and I think what you want.

    Countif Random Data sample.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,794

    Re: Random number generator question

    I'm not sure what you mean by "... list the qty of numbers ..."

    Do you mean the total (SUM) of the numbers, or the count (COUNT) of how many numbers you have generated? How does "...list..." come into it?

    What determines the lower value and higher value below/above which the outliers will be compared?

    Pete

  6. #6
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Re: Random number generator question

    Thank you for the help,

    Glenn Kennedy your solution worked like a charm, now i just need a way to list all of the outlier if there are any. Any suggestions on that?

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

    Re: Random number generator question

    Try this, but with the nature of random numbers, you're unlikely to get any... Now you DO need to adjust the ranges, daynamically as suggested previously by JonMo.

    these are array formulae. For lower-bound outliers:

    =IFERROR(INDEX($A:$A,SMALL(IF($A$1:INDEX($A:$A,$D$1)<$D$11,ROW($A$1:INDEX($A:$A,$D$1))),COLUMNS($D13:D13))),"")

    in D13, copied across. A similar formula was used in E14.

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    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)

Similar Threads

  1. [SOLVED] Random Question Paper Generator
    By Harrytheb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2020, 08:08 AM
  2. Macro random question generator in more than one column
    By tancho321 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2016, 03:43 PM
  3. Replies: 5
    Last Post: 06-21-2013, 10:40 AM
  4. Random Number Generator
    By phattony72 in forum Excel General
    Replies: 2
    Last Post: 02-19-2008, 12:56 PM
  5. Random Number Generator Question...
    By chriz2000 in forum Excel General
    Replies: 0
    Last Post: 07-21-2007, 09:41 AM
  6. random number generator
    By manclad in forum Excel General
    Replies: 5
    Last Post: 12-31-2005, 07:10 AM
  7. Try Random Number Generator
    By dok112 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-18-2005, 02:10 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