Determining Items Not In A List In #Excel

Here is how you can determine what items are not in a list using Conditional Formatting:

You can download the file here to follow along. If you see a preview, look for the download arrow in the upper right hand corner.

In column “D” I have a list of names. I want to check which names in columns “F” & “G” are on my main list. In column “F”, I want to highlight those that are on my list, in column “G” I want to highlight those that are not on my list.

List1

We will use Conditional Formatting for this process. First, we’ll tackle column “F” to determine which of those are in my list in column “D”. I highlight the names in column “F” and select Conditional Formatting from the Styles group on the Home tab and select New Rule:

List2

Then I’ll select “Use a formula to determine which cells to format”, and the following box appears for me to enter my formula:

List3

Here I will enter the following formula: =COUNTIF($D$2:$D$21,F2)>0. The syntax for COUNTIF is =COUNTIF(range,criteria). The range is the List in column “D”. Note that I’ve made this range an absolute cell reference using the “$”. However, I’ve left the criteria, which is the name in column “F” as relative, so that as the process goes through each row, the “List” stays constant, but the criteria for each name in rows 2 through 10 are evaluated:

List4

The logic is that Excel will count the number of times each name in column “F” is on the list in column “D”. If that number is greater than zero, it will format it accordingly.

I then click on Format, then the Fill tab and select the color I want:

List5

Click OK and OK again, and the names that are on my list are highlighted:

List6

The only difference in the formatting in column “G” is that we will want to highlight the cells when the count = 0. So our formula will be:

List7

It’s that simple! Notice how one list is just the inverse of the other.

Happy Excelling!

Related Post

Free Download!

Subscribe to Download Your FREE Copy of
"My 70+ Favorite Excel Keyboard Shortcuts" Today!

, , ,

No comments yet.

Leave a Reply