+ Reply to Thread
Results 1 to 4 of 4

Copy same row from multiple workbooks to new workbook.

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    14

    Copy same row from multiple workbooks to new workbook.

    Morning: I have a set of workbooks containing rainfall data for all parishes in Louisiana. The workbooks are .csv files and there is one for each parish. I would like to extract a particular range (B21:H21) from each workbook and place them into an existing master workbook. The extracted range would be copied to a seperate row in the master workbook; perferably starting at AB2:AH2 and going down from there with each .csv file imported. Ideally the parish name of the worksheet in the extracted workbook would match the parish name in AA2 of the master workbook and paste the data in AB2:AH2 and so on down the list. Thanks in advance for the help; if there is any.

    I have attached a representative workbook .csv file for the data export and a representative master workbook in which to paste it.

    The worksheet name "Acadia_mean" of the .csv file would need to match the cell name "Acadia" in the master workbook and paste the data in the corresponding row. I have highlighted the data to be extracted.

    Acadia_mean.csvMasterbook.xlsx

    Shane

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy same row from multiple workbooks to new workbook.

    Can you upload a couple more CSV files, preferably ones with the more complex names - ie. VERNON (Northwest) and similar. Thanks.

    Also, there any reason not to just create a new table each time the macro is run listing only the files that were found, then sorted? That's probably less plumbing then trying to insert into the existing table. The newly created table would have the exact same layout, but only list the parishes found in the macro run.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-04-2014
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    14

    Re: Copy same row from multiple workbooks to new workbook.

    Think I found something that works. Given that the parishes are listed in alphabetical order then this method gives me what i need.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy same row from multiple workbooks to new workbook.

    Except for the matching to existing rows, that should work nicely.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 1
    Last Post: 09-23-2014, 06:42 PM
  2. [SOLVED] Open Multiple Workbooks, Record names, Copy paste to Active Workbook, Close the Workbooks
    By vba_madness in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 06:09 AM
  3. [SOLVED] Copy Data From Multiple Workbooks to One Workbook
    By danderson2692 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2012, 04:36 PM
  4. copy selected range from multiple workbooks into multiple worksheets in one workbook
    By novak100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2012, 05:52 AM
  5. Copy Data from Multiple Workbooks into another Workbook
    By trust_lord in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-29-2011, 10:33 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