+ Reply to Thread
Results 1 to 5 of 5

Macro to extract rows from another files

  1. #1
    Registered User
    Join Date
    07-15-2012
    Location
    US
    MS-Off Ver
    Excel 2007/10
    Posts
    4

    Lightbulb Macro to extract rows from another files

    Hi Everyone!!

    I am trying to create a report file which can pull rows from another excel file
    and paste into MASTER SHEET in my open workbook.

    1. ROW A,B,C,F,H
    2. ROW A,B,I,L

    I am not a macro expert but m trying to learn. Attached worksheet will give
    you general idea what i basically want to do..

    Will appreciate any help.....

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to extract rows from another files

    Hello harsh767,


    Welcome to the Forum!
    1. Are you copying from one open workbook to another?
    2. If so, are both workbooks open in the same instance of Excel?
    3. Which worksheets will have their data copied to the Master worksheet?
    4. What are the cells to copied and where will they placed on the Master sheet?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-15-2012
    Location
    US
    MS-Off Ver
    Excel 2007/10
    Posts
    4

    Re: Macro to extract rows from another files

    Thanks for replying Leith!

    1. Ya I am copying from One work book to another (Master Sheet)

    2. Only mastersheet is open. Extract button will allow to select the file from its location. Extract the data to copy to MASTER SHEET.

    3. I want to copy specific Rows from primary and secondary files. Both will have only first worksheet.

    4. Row A,B,C,F,H,K to Master sheet. (is it possible to change rows for both as per the need?)

    5. They will be copied to first six rows of master sheet starting from A2. Same thing with secondary file but it will start from seventh row.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to extract rows from another files

    Hello harsh767,

    In summary, you want to copy 6 rows of data from the each of the other 2 workbooks. The first workbook you want to copy the data from the first workbook to the cells in columns "A,B,C,F,H" on the master sheet. The second sheet will copy cells in columns "A,B,I,L" of the master starting below the first six rows copied from the first workbook.

    Does each row on the first workbook only contain 5 cells? For example, say the first rows is A1:E1. Will these cells will copied to A2,B2,C2,F2,H2 on the Master sheet?

  5. #5
    Registered User
    Join Date
    07-15-2012
    Location
    US
    MS-Off Ver
    Excel 2007/10
    Posts
    4

    Re: Macro to extract rows from another files

    Hi Leith,

    Ya exactly. Both sheets have around 10-13 rows but
    I want to copy only specific 5 rows from it. The
    5 whole rows from primary will be copied to master sheet
    A2:F2 and other worksheet rows will be copied to h2:m2.
    Each row has around 400 contact details.

    Thanks!!

+ 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