I'm trying to create a macro which compares two Excel files. The only column both Excel files have in common is "eRequest ID
". The goal is to display any records that DO NOT have an "eRequest ID
" in both files.
For example, if record 1 is only found in one of the two files, it has to be displayed. The only situation where records are not displayed is if the "eRequest ID
" is found in both files.
On a side note.. I recorded a simple macro to filter out some fields... I have to add in this part into the final macro as well.
ActiveSheet.ListObjects("Table_JULY15Release_Master_Inventory__2").Range. _
AutoFilter Field:=2, Criteria1:=Array("90 BIZ - Deferred", _
"91 GTO - Deferred", "92 BIZ - Dropped", "94 GTO - Duplicate"), Operator:= _
xlFilterValues
ActiveSheet.ListObjects("Table_JULY15Release_Master_Inventory__2").Range. _
AutoFilter Field:=4, Criteria1:="Core Banking"
My brief answer: you'll need to build an array of each of your workbooks' unique IDs, and then filter vis-a-vis the array of the other workbook.
The remaining records will not be matching.
Working prototype:
Now it works on my sample workbooks.
Assumes source workbooks are open and listobjects are on the first sheet. Adjust workbook names and sheet indexes/names to suit: