To compare two columns, use IF, ISERROR and MATCH in Excel. You can display duplicates or unique values.
Join the channel Telegram of the AnonyViet π Link π |
Compare 2 columns in Excel
Show duplicates
1. Show duplicates in the first column (these values ββare also in the second column).
Explanation: the MATCH function in cell C1 returns the number 5 (the letter A was found at position 5 in the range B1:B7). As a result, the ISERROR function returns FALSE and the IF function returns the value in cell A1. The MATCH function in cell C4 returns the #N/A error (no D in the range B1:B7). As a result, the ISERROR function returns TRUE and the IF function returns an empty string.
2. You can also display duplicates in the second column.
Unique value in each column
1. Display unique values ββin the first column (these values ββdo not occur in the second column).
2. You can also display unique values ββin the second column.
Compare row by row
1. The IF function in cell C1 below returns a Match because the value in cell A1 is equal to the value in cell B1.
2. To perform a case-sensitive comparison, add the EXACT function.
3. You can also use conditional formatting to highlight columns.
In addition, you can also view many other excel articles here.