I have a workbook with 2 sheets. Sheet 1 has 3 columns (1A, 1B and 1C) and sheet 2 has 2 columns (2A and 2B). Now I need to delete rows from sheet 1 if 1A and 1B match any row in sheet 2 (i.e. 1A=2A and 1B=2B). So basically forget about 1C for the moment and delete all rows from sheet 1 that match rows in sheet 2.
One way would be to write a macro that takes each row of sheet 1, and compares 1A with all 2A values. If a match is found then compare the corresponding 1B with 2B and if those are the same too then delete the row from sheet 1. Given that the sheets have more than 100,000 rows each I think this will make the number of comparisons way too large and take a very long time.
Is there a more efficient way of doing this?
application.screenupdating = false
You may want to look into transferring the data to a relational database schema, like access