I have a bunch of Excel files in a directory. Each file has only 1 sheet which are formatted identically and are named all the same (i.e. Sheet 1). Only the file name has the indication differentiating the files from each other
I need to combine all these workbooks into 1 sheet, but the first column of this new combined dataset should be the last 8 characters of the file name of the original files. How would I go about doing this? Looking for an automated solution because this will be a monthly process
e.g.
Each workbook would be:
Col A | Col B |
1 | 2 |
2 | 4 |
Final combined output would be:
File name | Col A | Col B |
10312023 | 1 | 2 |
12312023 | 2 | 4 |