+ Reply to Thread
Results 1 to 7 of 7

VB that merges multiple files into one worksheet - but does this 3 times - see detail

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Post VB that merges multiple files into one worksheet - but does this 3 times - see detail

    Hey guys,

    I need your help with a 3 macros, I found some stuff that's close but isn't working quite right.

    I have a workbook that has the following tabs: "Directions", "Equipment Location Reports", "Low Battery Tamper Tag Reports", and "3rd Party Reports".

    On the "Equipment Location Reports" tab, I want to be able to select a "MergeEquipLocationReports" macro that will: prompt me to browse to whatever folder my files are in, select multiple files to merge, copy data contained in columns A-L of all the files I've selected, and paste it to the "Equipment Location Reports" tab without duplicating the column headings found in columns A-L of each sheet (they'll all have the same column headings).

    On the "Low Battery Tamper Tag Reports" tab, I want to be able to select a "MergeLowBatteryReports" macro that will: prompt me to browse to whatever folder my files are in, select multiple files to merge, copy data contained in columns A-K of all the files I've selected, and paste it to the "Low Battery Tamper Tag Reports" tab without duplicating the column headings found in columns A-K of each sheet (they'll all have the same column headings).

    On the "3rd Party Reports" tab, I want to be able to select a "Merge3rdPartyReports" macro that will: prompt me to browse to whatever folder my files are in, select multiple files to merge, copy data contained in columns A-AQ of all the files I've selected, and paste it to the "3rd Party Reports" tab without duplicating the column headings found in columns A-AQ of each sheet (they'll all have the same column headings).

    I would greatly appreciate your expertise!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: VB that merges multiple files into one worksheet - but does this 3 times - see detail

    Assumes your headers are in row 1 and each of the workbooks has only one sheet: It is left as a learning exercise for you to create the other 2 macros based on this macro.

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VB that merges multiple files into one worksheet - but does this 3 times - see detail

    Hi Bernie,

    It didn't work, it produced the following error:

    Run-time error '9':
    Subscript out of range

  4. #4
    Registered User
    Join Date
    10-25-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VB that merges multiple files into one worksheet - but does this 3 times - see detail

    Hey Bernie,

    Hold up .... let me retest - I think I might have done something wrong... hold tight...

  5. #5
    Registered User
    Join Date
    10-25-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VB that merges multiple files into one worksheet - but does this 3 times - see detail

    Hi Bernie Deitrick

    Ok, so it worked, the only problem was it left the column headings blank, I want the column headings to come over, I just don't want them duplicated times however many sheets I've selected to copy. I hope that makes sense - the only piece missing is the column headings.

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: VB that merges multiple files into one worksheet - but does this 3 times - see detail

    I thought you had them - use this version:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-25-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VB that merges multiple files into one worksheet - but does this 3 times - see detail

    Hi Bernie Deitrick,

    This is it exactly!! Thank you soooooooo much - you ROCK!

+ 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. I'm trying to run the same macro multiple times in the same worksheet.
    By m2kzw6 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2014, 12:32 AM
  2. [SOLVED] Pivot Table Detail - Macro to double click/show detail
    By popps in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2012, 11:28 AM
  3. create macro that merges cells and then transposes them into other worksheet
    By jloyzaga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2011, 07:36 PM
  4. [SOLVED] link a cell in the 'Master' worksheet list to a 'Detail' worksheet
    By Paul Condron in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-16-2006, 05:45 PM
  5. Summarize multiple worksheet detail on summary sheet
    By 061931 in forum Excel General
    Replies: 6
    Last Post: 05-23-2005, 10:06 AM

Tags for this Thread

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