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

noslenwerd

Board Regular
Joined
Nov 12, 2019
Messages
85
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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,214,925
Messages
6,122,298
Members
449,077
Latest member
Rkmenon

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