Valerian88
New Member
- Joined
- May 21, 2020
- Messages
- 2
- Office Version
- 2019
- 2010
- Platform
- Windows
I am looking out for a code to cut out the manual work of copying pasting data from multiple workbooks into one.
I have every staffs workbook in a specific folder which contains Sheet 1 and sheet 2 with data for the work done on each client in a tabular format for the entire month.
I want to have a code that will let me select the specific folder and then select a date range and then go to each workbook in that folder (where we have work done on each client in a tabular form with the client name in column A ) and take a total of all cells in that date range and paste the total under the master file which will have the same table with client name in column A and the total should be pasted in column B(Need the header of column B to be the workbook name from where the data is picked). Similarly the macro should then paste the data from the next workbook in column C and so on until the last given workbook in that column.
Workbook (EMP1)
Master File
I have every staffs workbook in a specific folder which contains Sheet 1 and sheet 2 with data for the work done on each client in a tabular format for the entire month.
I want to have a code that will let me select the specific folder and then select a date range and then go to each workbook in that folder (where we have work done on each client in a tabular form with the client name in column A ) and take a total of all cells in that date range and paste the total under the master file which will have the same table with client name in column A and the total should be pasted in column B(Need the header of column B to be the workbook name from where the data is picked). Similarly the macro should then paste the data from the next workbook in column C and so on until the last given workbook in that column.
Workbook (EMP1)
Header | 1-May | 2-May | 3-May | 4-May | 5-May |
ABC | 2 | 5 | 5 | ||
XYZ | 1 | 2 | |||
ABD | 7 | 6 |
Master File
Header | Emp1 | Emp2 | EMP3 | Total |
ABC | 12 | 12 | ||
XYZ | 3 | 3 | ||
ABD | 13 | 13 | ||
Total | 28 | 0 | 0 | 28 |