+ Reply to Thread
Results 1 to 5 of 5

creating and re-creating 'random' numbers from a specific seed that can be recreated

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    14

    creating and re-creating 'random' numbers from a specific seed that can be recreated

    I have an 4 x 23 array of random numbers currently made using randbetween. However, I want to be able to regenerate the exact same combination of numbers as needed.

    Context: I teach high-school maths and use spreadsheets for generating random numbers or random questions. I have set up question for revision, where each student gets four random questions from a large set. I have the answers already created and so I would like to be able to access the answers for each student again based on the seed used to generate the random questions.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: creating and re-creating 'random' numbers from a specific seed that can be recreated

    Hi Oberon,

    If you install the Analysis Tool Pack, it has a Random Number Generator that allows you to set a seed.

    See http://what-when-how.com/excel-vba/t...d-in-in-excel/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    14

    Re: creating and re-creating 'random' numbers from a specific seed that can be recreated

    Great!
    When I record that as a macro and drop it into some VBA will it work on a computer where the Analysis Tool Pack has not been installed?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: creating and re-creating 'random' numbers from a specific seed that can be recreated

    I don't think so.
    May be you shall use own pseudorandom numbers generator - could be based on the same algorithm, which is used in Excel - see: http://support.microsoft.com/KB/828795
    Best Regards,

    Kaper

  5. #5
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    14

    Re: creating and re-creating 'random' numbers from a specific seed that can be recreated

    ...actually I found this thread:
    http://www.excelforum.com/excel-prog...ndom-seed.html
    in the Similar Threads below. It seems the site's Search-fu is better than mine. I now have this coding:

    Please Login or Register  to view this content.

+ 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. Creating random numbers that add up to a specific number
    By PapaCheese in forum Excel General
    Replies: 1
    Last Post: 06-13-2012, 07:00 PM
  2. Set Random seed
    By oro77 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2011, 01:56 AM
  3. Replies: 4
    Last Post: 05-15-2010, 06:57 PM
  4. Creating Random numbers in Excel problem
    By mrosendal in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2008, 08:37 AM
  5. creating random numbers
    By pikachiu132 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2005, 01:55 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