tooireland8325
asked on
Open multiple files by looping through a list
I need to do the following:
1. open last years file from a specific folder for a list of values
2. open this year file from a specific folder for a list of the same values
3. copy and paste last years workbook into this years workbook
4. do some calculations and formatting in the mergered workbook
5. save the mergered workbook into a specfic folder
I have most everything working, I will admit that I am an Excel VBA hack, being self taught by searching out what I need to do from experts here and other internet findings. My current struggel is if I cannot find a file for LY or a file for TY I want to skip that item in the list and move onto the next item in the list.
My file error method works for my first file, but it does not work for my second file and I don't know why.
1. open last years file from a specific folder for a list of values
2. open this year file from a specific folder for a list of the same values
3. copy and paste last years workbook into this years workbook
4. do some calculations and formatting in the mergered workbook
5. save the mergered workbook into a specfic folder
I have most everything working, I will admit that I am an Excel VBA hack, being self taught by searching out what I need to do from experts here and other internet findings. My current struggel is if I cannot find a file for LY or a file for TY I want to skip that item in the list and move onto the next item in the list.
My file error method works for my first file, but it does not work for my second file and I don't know why.
it would help if you provided us with the actual code ;-)
ASKER
Of course it would!! My apologizes I thought I had attached my file.
CLI-Department-Report-Marco-with-loop.xl
CLI-Department-Report-Marco-with-loop.xl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.