+ Reply to Thread
Results 1 to 7 of 7

Copy Data From Two Worksheets to master Worksheet

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question Copy Data From Two Worksheets to master Worksheet

    Hi,

    Im new to Macro programming. I want to write a Macro to copy row by row in two worksheets data to a master worksheet in the same Excel file. For example if I copy the first row of first worksheet to the master worksheet's first row by Macro then the second worksheets first rows should copy to the second row of the Master worksheet etc..

    An example for the above requirement is greately appreciated.

    Thanks

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy Data From Two Worksheets to master Worksheet

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-04-2012
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Copy Data From Two Worksheets to master Worksheet

    Dear John,

    Thanks a lot for the reply. I tried your code under command button. The coding as follows
    Please Login or Register  to view this content.
    When I do that it gives the error " Run-time error '9'. Subscription out of rage". When I go to debug an see the definition it says "Identifier under cursor is not recognized"

    When I run the code without the command button option It doesn't give an error but nothing happens

    What did I do wrong?

    Thanks

    Amitha

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy Data From Two Worksheets to master Worksheet

    Sheets("Worksheet2")

    change the red text in your code and try again.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    10-04-2012
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Copy Data From Two Worksheets to master Worksheet

    Dear Oeldere and John,

    The code works to some extent . It was my mistake I have typed "Worksheet" instead of Sheet. But when I type number "1" in Sheet1 and press the command button it copies to the second row of the Sheet3. When I type number "2" in the first roe of Sheet2 it copies to the fourth row of Sheet3. It copies the number one of the first sheet on the Third row. Screenshots are attached to get a clear idea.

    What should I do to stop this repetition of copying data?

    The code as follows

    Please Login or Register  to view this content.
    Many Thanks

    Amitha
    Attached Images Attached Images

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy Data From Two Worksheets to master Worksheet

    Rather than screen shots can you attach a sample file for us to see? Click Go Advance and scroll down to the Manage Attachments button, browse to the required file, and then push the Upload button.

  7. #7
    Registered User
    Join Date
    10-04-2012
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Copy Data From Two Worksheets to master Worksheet

    Hi John,

    Here is the file


    Thanks
    Attached Files Attached Files

+ 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. Copy several worksheets to a master worksheet with given names
    By howyahorse in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2013, 08:04 AM
  2. Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 08:21 PM
  3. Copy multiple worksheets into a master worksheet
    By shabbir2812 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-10-2013, 01:31 PM
  4. Replies: 3
    Last Post: 01-09-2012, 06:13 AM
  5. copy rows from master worksheet to individual worksheets by cell value???
    By whittace in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2010, 10:49 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