vba code to copy data from all files in a specific folder to master file using date range given by user

Valerian88

New Member
Joined
May 21, 2020
Messages
2
Office Version
  1. 2019
  2. 2010
Platform
  1. 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)

Header
1-May​
2-May​
3-May​
4-May​
5-May​
ABC
2​
5​
5​
XYZ
1​
2​
ABD
7​
6​




Master File

HeaderEmp1Emp2EMP3Total
ABC
12​
12​
XYZ
3​
3​
ABD
13​
13​
Total
28​
0​
0​
28​
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
@Mentor82 I've seen your post with code for some similar issues like I have. Could you plz assist me with this one
 
Upvote 0

Forum statistics

Threads
1,214,792
Messages
6,121,612
Members
449,038
Latest member
apwr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top