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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

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