Excel - compare columns

Posted on 2013-01-17
Medium Priority
Last Modified: 2013-01-29
In Excel, is there a way to compare column A and B and highlight if the different?


accountnumber_A      accountnumber_B

12345                         11111
7890                           22222
2222                           12345
Question by:VBdotnet2005
LVL 24

Accepted Solution

Steve earned 2000 total points
ID: 38789786
you can use COUNTIF to determine if a value appears in one column of data from the other...

So to see if the value in A1 is in column B you can use:


Or you can use MATCH which will return the row number for the first matching data:

LVL 50

Expert Comment

by:barry houdini
ID: 38789790
Do you want to compare row by row or compare a value in one column against any value in the other?

If it's the former you can just use


or to compare A2 against any value in column B


You can use either formula on the worksheet and copy down the columns......or use within conditional formatting to format the relevant cells as required

regards, barry

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this article, I will demonstrate that how to do a PST migration from Exchange Server to Office 365. This method allows importing one single PST, or multiple PST's at once.
With the emergence of Office 365 as a superior email communication platform, many organizations have started switching over to it.  After migrating to Office 365, sometimes users, as well as organizations, will have to import PST files to Office 36…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question