How to compare two columns row by row with EXACT
This checks each row of one column against another and tells you where they match and where they differ, handy for spotting what changed.
The formula
=IF(EXACT(A2,B2),"Match","Different") in column C
What each part does
EXACTCompares the two exactly, capital letters included.
A2, B2The two cells being compared.
How it works, and what to watch for
EXACT compares the two down to the capital letters. If case does not matter to you, a plain equals sign is more forgiving.
It compares row against row, not whether a value appears anywhere in the other column. For that, COUNTIF is the tool.
Trailing spaces will show two identical-looking values as different. TRIM both sides if a match looks wrong.
Questions
Match and Different look the same to me, why?
One side probably has a trailing space, or the capital letters differ. TRIM clears the space; a plain = ignores the case.
How do I check if a value is anywhere in the other column?
That is a COUNTIF job rather than a row-by-row compare. It counts how many times the value turns up in the whole column.
The example sheet
Ordered
Delivered
Check
WID-01
WID-01
BLT-02
BLT-12
GEA-03
GEA-03
If this helped, these are close by
More on IF , and every walkthrough that uses it.
Formula List
Formula Fixer
Formula List
Settings: separator, Excel version
Argument separator
Set by your computer's language, not by the file. A frequent cause of a correct-looking formula being rejected.
Comma =SUM(A1,B1)
Semicolon =SUM(A1;B1)
Excel version
XLOOKUP, IFS, TEXTBEFORE and TEXTJOIN need Microsoft 365 or 2021; older versions return #NAME? instead. Choosing the older one switches every walkthrough to a formula that works there.
Microsoft 365 or 2021
2019 or earlier
Is a formula returning an error?
Paste it below for a line-by-line check.
Check the formula
Clear
or press Enter
Try one of these
© Formula Steps — formulasteps.com
Bookmark
Share