Solved

Excel - compare columns

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

sample

accountnumber_A      accountnumber_B

12345                         11111
7890                           22222
2222                           12345
etc
0
Comment
Question by:VBdotnet2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
Steve earned 500 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:

=CountIF(B:B,A1)

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

=MATCH(A1,B:B,0)
0
 
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

=A2=B2

or to compare A2 against any value in column B

=COUNTIF(B:B,A2)>0

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
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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