Solved

Excel - compare columns

Posted on 2013-01-17
2
316 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
2 Comments
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now