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.

Select the second list range B2:B7

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


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


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


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


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


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

Users are saying about us...

  1. 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 *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube