PDA

View Full Version : [SOLVED:] How to Combine Multiple Excel Workbooks into Existing Workbook



ragetastic
08-21-2019, 10:38 AM
Hey all, first time poster, I have some experience with VBA but I'm struggling with figuring out how to combine multiple time card workbooks into one for a client. The client wants to have all of their employees fill out individual time card spreadsheets, and I am trying to get this information consolidated and then turned into a format that can be imported into an accounting software. The issue I am having is with consolidating the information, I have the importing into the accounting software covered with other VBA.

Essential information below:

1. All of the time card excel workbooks will be in the same folder collected by the client.
2. The data needs to stack on top of each new file, so after pasting one file it will need to find the end of the data and paste the next time card and so on until there are no more files left.
3. All of the files including the excel file that this will be consolidated on, have the same number of columns and same header names.
4. The workbook that this pastes into needs to be an existing file that I have created (it can't just go into a new consolidated workbook), because it needs to be exported from this vba consolidated file based on criteria (overtime in one file, regular time in another, double time in another, etc., in preparation for import into an accounting software).

Thanks in advance for the help!

Bob Phillips
08-21-2019, 11:41 AM
Have you got access to Power Query? It's a doddle if you have.

ragetastic
08-21-2019, 11:45 AM
I do not and I doubt that my client (who will be using the spreadsheets) will have it either if it's required to run the macros.

snb
08-21-2019, 02:17 PM
Post sample workbooks (the one to be imported and the one it will be imported into)