Finding Matches and Differences: How to Compare Two Columns in Excel

Excel offers several ways to compare two columns, allowing you to find both matches and differences. This ability can be incredibly useful when working with large datasets. Here's how you can do this.

Finding Matches Using Conditional Formatting

  1. Select the range of cells you want to compare. For instance, if you're comparing columns A and B, you might select A1:B100.
  2. On the Home tab, click 'Conditional Formatting', then select 'New Rule'.
  3. In the 'New Formatting Rule' dialog box, select 'Format cells that contain'.
  4. Under 'Format cells with', select 'duplicate values'. Click 'OK'.
  5. All cells that appear in both columns will be highlighted.

  6. Find duplicate values with conditional formatting

Finding Differences Using Conditional Formatting

  1. Select the range of cells you want to compare.
  2. Click 'Conditional Formatting', then select 'New Rule'.
  3. In the 'New Formatting Rule' dialog box, select 'Format cells that contain'.
  4. Under 'Format cells with', select 'unique values'. Click 'OK'.
  5. All cells that only appear in one column will be highlighted.

  6. Highlight unique or duplicate values

Finding Matches Using a Formula

You can also use the IF function to compare two columns:

  1. In a new column, enter the formula =IF(A1=B1,"Match","") and press 'Enter'.
  2. Drag the fill handle down to the end of your data. The word "Match" will appear next to any rows where the values in columns A and B are identical.

  3. IF function

Excel provides multiple ways to compare two columns and find matches or differences. Whether you prefer using conditional formatting or formulas, this tutorial offers step-by-step guidance.

Previous
Previous

Creating Conditional Drop-Down Lists with IF Statements in Excel (5 Examples)

Next
Next

How to Compare Two Columns and Add Missing Values in Excel