KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to compare two columns and count differences in Excel?

AuthorSunLast modified

If there are two columns, which include duplicate values, how can you compare the columns and count only the different values in Excel? In this article, I will introduce methods to count the differences by cells or rows between two columns/ranges.

Compare methods for counting differences between two columns or ranges

Compare and count differences between two columns by cells
A screenshot showing a comparison of two columns for counting differences by cells

Compare and count differences between two ranges by rows good idea3
A screenshot showing the comparison of two columns in Excel for counting differences by rows


Compare methods for counting differences between two columns or ranges

The methods in this tutorial differ not only in how the differences are counted, but also in whether they can compare individual cells or entire rows. The table below highlights the key differences.

MethodComparison levelHow the count is obtainedBest for
Conditional Formatting + FilterIndividual values in two columnsHighlight matches, filter the remaining values by color, and read the count from the status barA built-in Excel solution for occasional cell-level comparisons
Kutools for ExcelIndividual cells or entire rowsSelects the differences and reports their number directly in a dialogQuickly finding and counting differences without formulas, formatting rules, or filtering
Recommendation: Use Conditional Formatting and Filter when you want a built-in Excel method for an occasional cell-level comparison. For a faster workflow, especially when you also need to compare entire rows, Kutools for Excel provides the more practical approach. Its Select Same & Different Cells feature can compare by individual cell or row, select the differences, and display the number of differences immediately without creating formatting rules or filtering the data.

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.
A screenshot of the Conditional Formatting menu in the Home tab of Excel

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.
A screenshot of the New Formatting Rule dialog box

3. Click Format, under the Fill tab, select a color for the duplicates.
A screenshot showing the Format dialog box

4. Click OK > OK. The duplicates have now been highlighted with the specified background color.
A screenshot showing the highlighted duplicates after applying Conditional Formatting

5. Select the column in which you highlighted the cells, click Data > Filter, and then click the Filter icon to select Filter by Color > No Fill.
A screenshot showing the Filter icon in Excel to filter by color
A screenshot showing the filter applied to show cells with no fill color in Excel

Now the differences in this column have been filtered. Select the filtered data and check the Status Bar to see the count.
A screenshot showing the Status Bar in Excel displaying the count of filtered cells

Tip: In the formula =COUNTIF($C:$C,$A1), A1 is the first cell of the column you want to count differences in, and column C is the other column you want to compare with.

Method 2: Select Same & Different Cells

If you have Kutools for Excel installed, you can use its Select Same & Different Cells utility to quickly find and count differences between two columns in just a few steps.

Kutools for Excel - Packed with over 300 essential tools for Excel. Make Excel tasks faster, easier, and more efficient. Download now!

1. Click Kutools > Select > Select Same & Different Cells.
A screenshot showing the Kutools Select Same & Different Cells option in Excel

2. In the Select Same & Different Cells dialog, select the two columns without headers in the Find values in and According to textboxes, then check the Single cell and Different Values options.
A screenshot of the Select Same & Different Cells dialog box

3. Click OK. A dialog box displays the number of different cells found, while the differences are selected in the worksheet.
A screenshot showing the result of selecting and counting different values between two columns using Kutools


Compare and count differences between two ranges by rows

If you want to compare the two ranges row by row rather than checking individual values, the same Select Same & Different Cells feature in Kutools for Excel can perform the comparison by entire row and report the number of different rows directly.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Integrated with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Click Kutools > Select > Select Same & Different Cells.
A screenshot showing the Kutools Select Same & Different Cells option in Excel

2. In the Select Same & Different Cells dialog, select the two ranges without headers in the Find values in and According to textboxes, then check Each row and Different Values.
A screenshot showing the Select Same & Different Cells dialog box with options to compare by row

3. Click OK. The different rows in the range specified in Find values in are selected, and the number of differences is displayed in the pop-up dialog.
A screenshot showing the result after comparing two columns and counting different rows using Kutools

Kutools for Excel - Supercharge Excel with over 300 essential tools, making your work faster and easier, and take advantage of AI features for smarter data processing and productivity. Get It Now

Demo: Select Same & Different Cells using Kutools

 
Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy AI-powered features for smarter and faster work! Download Now!

Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in