+ Reply to Thread
Results 1 to 7 of 7

Random number generating.

Hybrid View

  1. #1
    Registered User
    Join Date
    08-10-2023
    Location
    ZA
    MS-Off Ver
    Excel
    Posts
    3

    Random number generating.

    I am trying to create exercise sheets for students to do division sums. Addition subtraction and multiplication was easy as I can just generate random numbers between 2 set values. With division however I need to generate a first number and then generate a second number that is a factor of the first so that the sum divides evenly without remainder. If anyone has any advice on how I can try and do this it would be greatly appreciated.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Random number generating.

    VBA coding is a better option. Is it ok.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Registered User
    Join Date
    08-10-2023
    Location
    ZA
    MS-Off Ver
    Excel
    Posts
    3

    Re: Random number generating.

    Did not even know it existed until now, but if it will solve my problem I'm happy to give it a try.

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Random number generating.

    multiplication was easy
    If multiplacation was easy in that case division is also easy.
    You determine the two numbers in exactly the same way, but you show the product of these numbers and one of these numbers.

    Is this information enough to adjust your own sheet? Otherwise, upload your sheet with the multiplication here.
    Then we know exactly how you want it. Then a member can convert that to a division here.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,174

    Re: Random number generating.

    You can generate the second number in B2:

    =RANDBETWEEN(1,10)

    And create the first number in A2:

    =RANDBETWEEN(1,10)*B2

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,091

    Re: Random number generating.

    does this work

    in A1 put - =B1*RANDBETWEEN(1,INT(1000/B1))
    in B1 put - =RANDBETWEEN(1,500)
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Registered User
    Join Date
    08-10-2023
    Location
    ZA
    MS-Off Ver
    Excel
    Posts
    3

    Re: Random number generating.

    This is a really good example of trying to over complicate things, I tell students every day "Dont make it harder than it needs to be" yet multiply a random number by a random number never occurred to me... Thank you very much for all the help.

+ 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 generator not always generating random numbers
    By Murman01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2021, 05:29 PM
  2. [SOLVED] Generating a random number
    By kimi01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-02-2020, 11:57 AM
  3. Generating random number
    By ASP__DEVELOPER in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-18-2012, 01:06 AM
  4. generating random number & 0s and 1s
    By nynamyna in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2011, 05:01 PM
  5. Random number generating
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-14-2010, 03:39 PM
  6. Generating a Random Number of Random Numbers
    By Garrus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2010, 09:39 AM
  7. Random Number Generating
    By tctees in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2008, 12:55 PM

Tags for this Thread

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