Macro for consolidating excel files

12 Nov

Hi All, I have around 10-15 excel files in a folder which are refreshed each week. REgards, Hi From your code it looks like you are using Excel2007 or later?

I need to loop through these files and copy the data form them into one master sheet. Can you attach an empty sample datafile, with just the headings?

Path = "S:\Reporting\Pipeline\Submitted by departments\Pipeline template imp. Open Filename:=Path '''''End of Open Workbook copies form the additioanal workbook Sheets("Pipeline"). It will open each Excel file in a directory, run your macro, then close the workbook and cycle to the next file. Once I have all the data together I can then continue to put my code on there to convert all values into a single currency etc.

However you can achieve it through multiple methods.

You can simply copy the rows from one worksheet to append it to another one.

Although the macros are not required to be written from scratch, some knowledge of programming concepts such as if -else- loops and nested loops can prove useful when writing macros for Excel office software.

Redundant data can be removed from the Excel worksheets by using macros that can compare and combine unique data in Excel sheets. There is redundant data in both sheets as well as unique data.