How to Compare Two Lists In Microsoft Excel

 

In this article, you will learn comparing two lists using Conditional Formatting. The common cities will get highlighted.

We will use Conditional Formatting using COUNTIF function to get the result.

 

 

Let us take an example to understand:

We have two lists of cities that Frank & Larry will visit. We want to figure out the common cities between both; if require they can meet & discuss the business strategies.
img1

Select the second list range B2:B7

  • Click on Home tab
  • From Styles group, click on Conditional Formatting
  • Click on New Rule

img2

  • In the New Formatting Rule dialogue box, select “Use a formula to determine which cells to format”

img3

  • Enter the formula =COUNTIF($A$2:$A$7,B2)>0

img4

  • Click on the Format & set the formatting, then click OK twice.

img5

The formula in conditional formatting will highlight the cells that match with column A

img6

In this way, you can get the list of common cities.



5 thoughts on “How to Compare Two Lists In Microsoft Excel

  1. Both list item must be unique to be able to distinguish. e.g., if you have JOHN in list1 twice you won’t get the desired result.

  2. What if you receive the number 4 in the results list? What does it mean? I checked to see if it was a duplicate but it is not.

  3. Both list item must be unique to be able to distinguish. e.g., if you have JOHN in list1 twice you won’t get the desired result.

  4. What if you receive the number 4 in the results list? What does it mean? I checked to see if it was a duplicate but it is not.

  5. I have two worksheets that have columns of date of birth and a unique provider number. I need to run some sort of search (?) to see if any of any of the data from one work sheet matches any of the data in the other work sheet. Is there a way to do this for all the information rather than doing a find for each cell in the column? That would take forever and so there must be a way to do that. I’m a novice user, but I have faith that this program can do it. I just have no clue

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>