+ Reply to Thread
Results 1 to 4 of 4

Generate Random numbers across sheets

  1. #1
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    263

    Generate Random numbers across sheets

    Hi All

    I am creating command button to generate numbers from Range("B2 : G26"). The code works well with the active sheet.
    I am looking for suggestions on how to generate numbers in other sheets for range ("B2:G26") as well using the same code/ command button.

    Please Login or Register  to view this content.

    Also i would like while the below line code executes only one set of numbers (example :10 across the range)

    Please Login or Register  to view this content.
    Last edited by grkchakri; 04-17-2018 at 02:54 PM.
    Never confuse a single defeat to the final defeat.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: Generate Random numbers across sheets

    You may have to place the formula in each cell first, then change the ranges into values.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    263

    Re: Generate Random numbers across sheets

    I am looking for some suggestions if i can generate random numbers through vba across all sheets (example 3_sheets at same range "b2:g26") at once. and also want to understand why the below code only generates a single number.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    263

    Re: Generate Random numbers across sheets

    Hi All

    I was able to generate random numbers all the 4 sheets using one command button using below code. Any other suggestions to simply code.

    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. [SOLVED] generate random numbers between 1 to 10 vba rnd()
    By ihrktho in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-09-2014, 09:51 AM
  2. Generate Random Numbers Between 0-9
    By dreicer_Jarr in forum Excel General
    Replies: 11
    Last Post: 01-17-2014, 01:00 AM
  3. [SOLVED] Generate Random numbers where sum = 1
    By sajeel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2013, 07:12 AM
  4. [SOLVED] Generate Random Numbers
    By stojko89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2013, 02:49 AM
  5. generate random numbers
    By fo05kka in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2009, 09:55 PM
  6. Using VBA to generate random numbers
    By matt3542 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-02-2008, 09:15 AM
  7. Generate Random Numbers
    By Rgaherty in forum Excel General
    Replies: 5
    Last Post: 10-30-2007, 04:08 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