+ Reply to Thread
Results 1 to 6 of 6

Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,..)

  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    4

    Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,..)

    I'm a beginner both in excel and in this forum. I need help regarding generating 40 rows (Columns of 17 (Columns A - Q) Random numbers (1 to 5) that will sum to specific values (60, 55..) in R Column, and to regenerate it on pressing any key. The same has been done for one value in http://www.excelforum.com/excel-prog...ml#post3590403 but I need it for a set. I shall be thankful.

  2. #2
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,

    see attachment
    Attached Files Attached Files
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    02-18-2014
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,

    Thank you for the concern. Actually I only know the sums and want to generate the row through a macro. I can generate data like the above attachment.

  4. #4
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,

    add as many values between 17 and 85 in column R and run the macro "random17"

  5. #5
    Registered User
    Join Date
    02-18-2014
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,

    Thank you for your kind help. How can I edit the "macro17" if I need 490 or such other numbers such numbers.

  6. #6
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Generating 40 rows of 17 Random numbers (1 to 5) that will sum to specific values (60,

    ALT-F8 to edit the macros and there you choose your macro (there is only 1 at the moment) and "modify" at the right I think.
    But I don't think you want to modify the macro, you want 490 numbers in column S, I suppose. So add 490 numbers in column S.
    Perhaps your problem is that that number for the moment may not be the result of a formula but a fixed number ?

+ 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. Generating Random numbers that will sum to 1 specific value?
    By zr11 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-24-2019, 10:08 AM
  2. Generating 365 Random numbers (0 to 5) that will sum to a specific value (1477)?
    By dr3amxstar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-18-2014, 08:55 PM
  3. Generating random numbers
    By softik in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2013, 01:52 AM
  4. Generating a list of Random numbers of random length...
    By Growl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 12:10 PM
  5. 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

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