Hi everyone,
I am new to VBA and I need help with this. Any help will be appreciated.
So I have a folder called "Main Source" which is located in 'C:\Documents and Settings\' and inside it there are multiple subfolders named "Publish on yyyy.mm.dd" where yyyy.mm.dd is the date I created the subfolder. More subfolders named in the same way will be added. Inside each subfolder, I have 2 excel files. One is called "Data yyyy.mm.dd" and the other is called "Table yyyy.mm.dd.
I would like to write a macro to pull data from only Column B of Sheet1 in "Data yyyy.mm.dd" in all subfolders and put them in another workbook called "Output" as a summary.
The format of all "Data yyyy.mm.dd" files identical, with column A as the reference years.
I would like to have data from Column B of the file "Data yyyy.mm.dd" to be pasted to the "Output" file corresponding to the reference years enterred in Column A. Each "Data yyyy.mm.dd" file should give one column of data starting from Column B if any relevant data exist. Also, the name of the subfolders where the sources come from should be showed in row 3, on top of each data column.
Say If there are 10 "Data yyyy.mm.dd" files, there should be 10 columns of data copied from them to the "Output" starts from Column B.
I attached the sample files. Sorry it's a bit lengthy. Thanks in advance.
Bookmarks