Hi all,
I need to write a macro that can open up multiple excel sheets in multiple folders, perform a series of calculation and close those files. If it can perform the calculation without opening the book (to the user) that would be even better.
The excel files are located within two subfolders. The root folder could contain as many as 15 sub folders, and within ea sub folder would be two more folders, and within ea of those two folders would be one and then the excel file. (sorry this is difficult to write in words )
For instance:
.....\Root Folder\Sub folder 1\sub sub folder 1\folder\*.xls
.....\Root Folder\Sub folder 1\sub sub folder 2\folder\*.xls
.....\Root Folder\Sub folder 2\sub sub folder 1\folder\*.xls
.....\Root Folder\Sub folder 2\sub sub folder 2\folder\*.xls
....
....
....
and so on.
So far I have a macro that can allow me to pick a specific file, that will perform a series of calculation based on a recorded macro. But my macro only allows me to pick one file from the folder.
I would like to be able to include the above functionality to batch process a lot of data. I have ~80 excel files in each of the folder (last level) listed above, and my program currently only does calculation on one of those excel files.
I would greatly appreciate any help you experts can give me. I have dug through many forums and found snippets that does things close enough, but not to this level of flexibility. . I am a noobie in VBA and so the help portion is not very helpful.
Thanks in advance...
I need to write a macro that can open up multiple excel sheets in multiple folders, perform a series of calculation and close those files. If it can perform the calculation without opening the book (to the user) that would be even better.
The excel files are located within two subfolders. The root folder could contain as many as 15 sub folders, and within ea sub folder would be two more folders, and within ea of those two folders would be one and then the excel file. (sorry this is difficult to write in words )
For instance:
.....\Root Folder\Sub folder 1\sub sub folder 1\folder\*.xls
.....\Root Folder\Sub folder 1\sub sub folder 2\folder\*.xls
.....\Root Folder\Sub folder 2\sub sub folder 1\folder\*.xls
.....\Root Folder\Sub folder 2\sub sub folder 2\folder\*.xls
....
....
....
and so on.
So far I have a macro that can allow me to pick a specific file, that will perform a series of calculation based on a recorded macro. But my macro only allows me to pick one file from the folder.
I would like to be able to include the above functionality to batch process a lot of data. I have ~80 excel files in each of the folder (last level) listed above, and my program currently only does calculation on one of those excel files.
I would greatly appreciate any help you experts can give me. I have dug through many forums and found snippets that does things close enough, but not to this level of flexibility. . I am a noobie in VBA and so the help portion is not very helpful.
Thanks in advance...