How to compare two columns and count differences in Excel?
If there are two columns, which are include duplicate values, how can you compare the columns and count the different values only in Excel? Here article, I will introduce the methods to count the differences by cells or rows between two columns/ranges.
Compare and count differences between two columns by cells
Method 1 Conditional Formatting and Filter functions
To compare two columns and count differences by cells, you can use the Conditional Formatting function to highlight the duplicates first, then use the Filter function to count the total differences.
1. Select the column you want to count the differences, click Home > Conditional Formatting > New Rule.
2. In the New Formatting Rule dialog, select Use a formula to determine which cells to format in the Select a Rule Type section, then type this formula =countif($C:$C, $A1)into the Format values where this formula is true textbox.
3. Click Format, under Fill tab, select a color for the duplicates.
4. Click OK > OK, now the duplicates have been highlighted with a specific background color.
5. Select the column which you have highlight some cells, click Data > Filter, and then click the Filter icon to select Filter by Color > No Fill.
Now the differences in this column have been filtered. Select the filtered data and go to the Status bar, you can see the count.
Tip: In the formula =countif($C:$C, $A1), A1 is the first cell of the column you want to count differences, column C is the another column you want to compare with.
Method 2 Select Same & Different Cells
If you have Kutools for Excel installed, you can use it’s Select Same & Different Cells utility to quickly count the differences by cells or rows between two columns with 3 steps.
Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
More than 300 powerful features. Supports Office/Excel
2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features
30-day free trial. 60-day money back guarantee.