+ Reply to Thread
Results 1 to 4 of 4

Generating report from different excel files

Hybrid View

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Leeds, UK
    MS-Off Ver
    MS Office 2016
    Posts
    79

    Red face Generating report from different excel files

    Hi
    I want help to create a macro to generate a report. Requirement is as follows…
    In the attached zip file there are two folders input and output and one excel file as “Macro”. All of them will be pasted in Desktop. Input folder contains 3 file Automobile yyyymmdd, Helthcare yyyymmdd, Infrastructure yyyymmdd. They are downloaded from Sharepoint so each week yyyymmdd get changed. In output folder there is one excel file as “Masterdata” Now in “macro” excel file, input and output path is given and so as the file name of the excel files (except yyyymmdd). What the macro should do is it will open each file in the input folder (depending on the first part of the file name except yyyymmdd) and copy the content in each tab and paste it to respective tab in masterdata i.e. content of "region 1" tab of all (input) excel files will be pasted under "region 1" tab of “Masterdata” file. In the end it will save the Masterdata file.
    Please let know if you need more info.
    Attached Files Attached Files
    Last edited by Abhijit2011; 08-07-2012 at 05:21 AM. Reason: Solved

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Generating report from different excel files

    Give this a try. Change the input/output directory

    Macro_v1.xlsm
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    06-09-2011
    Location
    Leeds, UK
    MS-Off Ver
    MS Office 2016
    Posts
    79

    Re: Generating report from different excel files

    Worked like a charm...Many thanks Mike. Quite a long code....took a long time to understand... appreciate your hard work behind this.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Generating report from different excel files

    @Abgijit2011

    Your welcome. To give credit where credit is due the combinding of the array function comes from Chip Pearson and can be found at http://www.cpearson.com/excel/vbaarrays.htm.

+ 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