+ Reply to Thread
Results 1 to 3 of 3

Random numbers in a fill range that total to another cells value

  1. #1
    Registered User
    Join Date
    05-17-2012
    Location
    Turlock, CA.
    MS-Off Ver
    Excel 2007
    Posts
    2

    Red face Random numbers in a fill range that total to another cells value

    I used random number coding to total a range up to 30 random numbers (MyFill Sub), now I need the sum of that range to equal a real number that I input. How can this be done?

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Random numbers in a fill range that total to another cells value

    Welcome to the forum

    If I understand the context of your question, you could look at using Excel's Solver Add-in
    Solver can update the result of a formula to match a specific value but changing the values of the precedent cells of that formula.

    Solver is an add-in that you can activate in Excel. It will then display on the DATA ribbon.
    Regards,
    Rudi

  3. #3
    Registered User
    Join Date
    05-17-2012
    Location
    Turlock, CA.
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Random numbers in a fill range that total to another cells value

    Rudi, thanks so much for the help! I have been out of contact due to VA appts and memorial services for friends and such. your solution worked remarkably well and thanks again.
    When I run my code MyFillRange I have to manually press Alt+F11. Is there a way to add a line of code to make the results show automatically?

+ 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] Auto Fill Cells if numbers match another column/range?
    By michaelrusk in forum Excel General
    Replies: 5
    Last Post: 12-07-2012, 11:15 AM
  2. [SOLVED] random numbers to fill a certain amount cells in a row
    By bunjijumper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2010, 08:15 AM
  3. random numbers to equal a total
    By dealer in forum Excel General
    Replies: 8
    Last Post: 10-11-2010, 05:52 PM
  4. array of 12 random numbers that total 100
    By Tom.B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2009, 02:00 PM
  5. [SOLVED] create range of cells with random numbers
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2006, 12:35 PM

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