Compare three columns on multiple sheets, validate column, add to count...

noslenwerd

Board Regular
Joined
Nov 12, 2019
Messages
76
Office Version
  1. 365
Hello. I wasn't quite sure how to summarize this one. But here goes. Please reference the screenshot below:

excel-coun2ts.jpg


I have multiple sheets of data with 20,000+ records on each sheet. So having this code be as lean as possible is what I am shooting for. I already have some code that works, but it takes 3-4 hours to run.

What I am trying to do is this:

Run through each record on sheet '040521,' and see if there is a match for columns A, B, and C on the following sheet '032921'. IF there is a match, AND the Ship Date (column D) is DIFFERENT between the two records, add +1 to Change Count (Column E). After I run through each record on 040521, I also then want to compare all records between the remaining sheets. ie: Compare '032921' with '032221' and so on.

I don't necessarily need help on looping through each sheet, but more to know what might be the most efficient way to make each of these comparisons. I currently combine columns A,B,C into a new cell in column F, then compare on that. That process doesn't take that long, but running through and comparing column F on every sheet takes quite a while.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Watch MrExcel Video

Forum statistics

Threads
1,129,893
Messages
5,638,869
Members
417,057
Latest member
Jimbo Jones

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
Top