+ Reply to Thread
Results 1 to 4 of 4

vba to copy specific sheet tab from several files folder to consolidation workbook

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    vba to copy specific sheet tab from several files folder to consolidation workbook

    I have a lot of workbooks in folder C:\BACKUPDOC.

    All the workbooks have sheets multiple sheets but my goal is extract from these workbooks a specific sheets named Infos_Container.

    The header starts at A3 to AS 3

    Data starts at A4 to AS 4 still to last data row.

    Among the columns there may be empty cells or empty columns.

    From folder C:\\BACKUP copy all sheets in that folder which has sheet name Infos_Container. to a specific workbook consolidation in same folder.

    then rename tab sheet as per cell H4 of each workbook.

    Attached sample results (consolidation)with one dummy file .

    In sample results there are two sheet tab as example.
    All files have same format

    Looking a vba code to achieve this.
    Attached Files Attached Files
    Last edited by JEAN1972; 12-15-2018 at 05:23 AM. Reason: wrong file

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: vba to copy specific sheet tab from several files folder to consolidation workbook

    The header starts at A3 to AS 3

    Data starts at A4 to AS 4 still to last data row.
    Are you sure?
    Seems header in the 1st row and the data starts from row2...

  3. #3
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba to copy specific sheet tab from several files folder to consolidation workbook

    Sorry, header starts at B3 to AS3 for each extractdata sheet & extractdatasheet1

    data starts at B4 TO AS4 still to last data row for each extractdata sheet & extractsheet1

    In consolidation sheet is the output results(vba) which will starts at row 1 (headers) and then at rows 2 data.
    Attached Images Attached Images

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: vba to copy specific sheet tab from several files folder to consolidation workbook

    Since H4 in 2 workbooks are the same "Data", it will end up a blank sheet, due to not allowed to have same sheet names.
    Please Login or Register  to view this content.
    Edit: typo
    Last edited by jindon; 12-15-2018 at 07:16 AM.

+ 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. [SOLVED] macro to copy from a closed workbook on a desktop folder and save specific amended sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2017, 08:56 AM
  2. macro to open files and copy specific sheet into new workbook (have open files part)
    By dangerdavedsp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 02:23 PM
  3. How to copy Sheet to a new workbook and save to a specific folder
    By moxman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2014, 07:43 PM
  4. Extract specific column data from specific sheet from multiple files in a folder
    By piggyfox in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-31-2013, 11:51 AM
  5. Marcto to copy sheets from one workbook to a master sheet, for all files in folder
    By crombieguy91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2013, 11:12 AM
  6. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM
  7. [SOLVED] Copy 10 rows from specific files in a folder
    By GDM69 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-07-2012, 10:13 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