VBA Vlookup data from multiple workbooks

Farid86

New Member
Joined
Nov 14, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone!

I have 3 separate folders named A,B & C, each contains 2 files with a filename starting with folder name it is saved into and the date ( for ex.: A 14110221 & A 07112021). Each workbook has only one worksheet with two columns in it with lots of rows (up to 500k). What I am trying to do is:

Step1 - Open each workbook starting from the folder named A and merge the columns into one in each worksheet of each of the workbook (columns may have empty cells, so must delete them);
Step2 - Vlookup data from the workbook with the most recent date (as per the filename) against the workbook with more older date;
Step3 - Paste the unique data into the separate workbook (containing macro) Sheet 1;
Step4 - Paste the duplicate data into Sheet 2 (same workbook with macro);
Step5 - Run the macro which I have in order to create csv files from Sheet 1 and the Sheet 2;
Step6 - Repeat the above for the workbooks from the folders B & C;

I would really appreciate if someone could help me out with the VBA macro for the above as this is a lot of manual work to do...
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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