+ Reply to Thread
Results 1 to 4 of 4

Copy data from several workbooks to one master workbook

  1. #1
    Registered User
    Join Date
    03-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2

    Unhappy Copy data from several workbooks to one master workbook

    Hi!

    I have multiple Excel workbooks (with different names) and I want to copy some data from column A and column C (the cell names/reference are same in all the workbooks). I want to paste this data to 1 master excel file such that the data goes to the next available row instead of overwriting.

    Can you please tell me the steps to record a macro for this purpose. I do not know how to write the VBA script.
    From Company ABC file to Master file.
    A1 to go to A4;
    N5 to go to B4;
    P5:P12 to transpose and go to C4:J4.

    Such that the data from the next Company file should go to row 5 in the Master file.

    Seriously need your help. My job is in danger!!
    Please please respond quickly.
    Attached Files Attached Files
    Last edited by beginneratexcel; 03-10-2013 at 05:53 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy data from several workbooks to one master workbook

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    Last edited by arlu1201; 03-11-2013 at 03:24 PM.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Copy data from several workbooks to one master workbook

    I'm really really grateful to you replying to my question. But the problem is that I have absolutely no knowledge of VBA script.
    So, when i ran the code you sent, this error came- Compile error- variable not defined. I think there is an error in naming the file or file location. If you could specify the file names that you have used and where i need to edit according to the name and the location of the file in my computer.

    It will be a big help.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy data from several workbooks to one master workbook

    Actually i missed out in declaring a variable. I have edited the above code and you can try it and let me know. Change the path in this line
    Please Login or Register  to view this content.
    to reflect the path where your files are located.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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