PDA

View Full Version : Combining multiple xlsx worksheets into 1 worksheet in Excel 2007



PamK
01-19-2014, 09:05 AM
I have 84 separate worksheets, all xlsx files. I need to combine all into 1 worksheet. The caveat to this is that I need to add the source filename to each record when added into the 1 consolidated worksheet.

Attached are the first 3 files combined. I have added the filenames to this example.
File 1 filename is: CHARLOTTE PEACE JAN20 FINAL PENDED LIST.xlsx
File 2 filename is: Charlotte Peace WTR20 FINAL PENDED LIST.xlsx
File 3 filename is: CHN DEC10 FINAL PENDED LIST.xlsx.
The data in the files only contains columns A - J. And column K should contain the source filename.

I have tried using the combined KB#151 and KB#221 just to combine the files and neither worked. In reviewing the code, I'm finding only xls files are referenced throughout the macro. I'm a bit lost here and fear I am stuck with doing this manually.

Attached are the first 3 files combined as I'm hoping you can help me with.