Compare 2 columns, return error if mismatch

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have a list of values in range A2:A20000 (many of them duplicates), and then another list of values in range B2:B200 (all unique)
List of values in column A changes dynamically while column B is static.
I need a formula - if there's one - which would cross-check two columns and return an error message if a value in column A is not found in column B (exact match). In ideal case, I would need the mismatched value listed/called out specifically (if there are several mismatches, it's ok to flag just the first one). However, at the very least I need some kind of error if there's a mismatch to be able to look into this manually...
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
How about in C2 copied down
Excel Formula:
=IFNA(MATCH(A2,$B$2:$B$2000,0),"Oops")
 
Upvote 0
Apologies, one important update now embedded in my post above... column A is by far the longer (and with duplicates)
 
Upvote 0
Then just change the range to B$200 not B$2000
 
Upvote 0
I'll need to check all 20000 entries from column A against column B (in which case I'll need 20000 cells with formulas) - is there any other way please to make the check more compact? Out of 20000 entries, only 100 or so are unique.
 
Upvote 0
How about using conditional formatting to highlight those that don't match?
 
Upvote 0
If you want to flag col A if it's not in col B how would you do that if you don't want a formula in every cell?
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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