+ Reply to Thread
Results 1 to 7 of 7

Consolidation macro

  1. #1
    Registered User
    Join Date
    06-14-2021
    Location
    India
    MS-Off Ver
    office 2013
    Posts
    4

    Smile Consolidation macro

    Hi Everyone,

    I am new to this forum and in need of an excel macro help.

    I have few excel files in a folder. one for each month.

    In every excel file, there are columns with same headers. In column A of every file there names of employees.

    What I want to do is, once I run a macro a new file for each employee name should be created and saved at the same path.

    For example, Once I run macro, Data for all "A" from column A should be appended on below the other. And the file should be saved as File A at the same path.

    So end result will have 3 files "File A", "File B" and "File C".

    I have attached here files for Jan Feb and Mar for demo purpose.

    If anyone of you can help me then that would be great.

    Thank you.
    Attached Files Attached Files
    Last edited by Vellam; 06-14-2021 at 10:37 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,102

    Re: Consolidation macro

    Try this macro. run it from one of your files that you uploaded.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-14-2021
    Location
    India
    MS-Off Ver
    office 2013
    Posts
    4

    Re: Consolidation macro

    Hi maniacb,

    Thank you so much for your quick response. Highly appreciated.

    I applied your code and wanted to highlight one thing. Your code is working absolutely fine but it is creating one file for each month.

    What i want is One file for each name with data from Jan Fab and Mar.

    For example, end result should be File A which will have data from A from Jan, A from Feb and A from Mar. And so for other names.

    If you can help.

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

    Re: Consolidation macro

    This will overwrite the workbook(s) if A.xlsx, b.xlsx,... etc, are already in the folder.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,102

    Re: Consolidation macro

    Here is my update.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-14-2021
    Location
    India
    MS-Off Ver
    office 2013
    Posts
    4

    Re: Consolidation macro

    Hi maniacb,

    Perfect. This worked very well.

    I am very happy with the solution. Thanks a lot for this help

    Just a quick question. In the end when I open the result file for every Name (A, B etc) cell selected is the last one.

    Is there any change in the code that can be done, so that when i open any result file, Cell A1 should be selected.

    If this can be done then that would be great.

    Thanks a lot once again.

  7. #7
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,102

    Re: Consolidation macro

    Sure, that can be done.

    After

    Please Login or Register  to view this content.
    and before

    Please Login or Register  to view this content.
    enter

    Please Login or Register  to view this content.

+ 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. Need Help De-Bugging Consolidation Macro
    By vba_cpa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2018, 12:12 AM
  2. Consolidation formule or Macro help
    By mlopez60120 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2017, 04:06 PM
  3. Consolidation Macro for two different datasets
    By cordyceps in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-24-2016, 03:40 PM
  4. [SOLVED] Consolidation Without Using A Function On Consolidation Screen
    By zanshin777 in forum Excel General
    Replies: 3
    Last Post: 12-27-2015, 03:35 AM
  5. [SOLVED] Consolidation several tabs' data into a consolidation sheet via a loop?
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-30-2015, 08:18 AM
  6. Consolidation Macro
    By rebeccad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2012, 05:28 AM
  7. Help on a consolidation macro
    By bobbak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2005, 06:05 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