I need a VBA code that copies everything in each sheet in hundreds of workbooks. Each workbook may contain multiple worksheets or just 1. In addition to this, I need a column at the end of it to tell me which data came from which file (so that I can locate the file for double checking).
I have collected a code that does something similar and edited it to do the multiple sheets bit.
My changes to the original code (found elsewhere on the net), are:
- new variable NBS, used for counting number of worksheets in external workbook
- relate a to NBS in subsequent lines when copying
- added in the count function
I'm not my edits are ok or not, for now I haven't ran into errors (yet).
Could someone kindly give it a double check?
Many thanks in advance!
Bookmarks