Highlight cell if value found in another list

MelanieB
3StarLounger
Posts: 310
Joined: 19 Apr 2010, 16:18
Location: middle of the state of Washington

Highlight cell if value found in another list

Post by MelanieB »

I feel like I should know this! Gack!
I have two lists of employees.
I want to highlight the employee's name in list 1 if their name is found in list 2.

How can I do that?

User avatar
HansV
Administrator
Posts: 78383
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Highlight cell if value found in another list

Post by HansV »

You can do this with Conditional Formatting.
Select list 1.
The first cell in the list should be the active cell in the selection.
In the following, I will use A2 as this cell.
And I will assume that list 2 is 'Sheet 2'!D2:D100.
On the Home tab of the ribbon, select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula

=COUNTIF('Sheet 2'!D2:D100,A2)>0

Click Format...
Activate the Fill tab.
Select a color.
Click OK, then click OK again.
Best wishes,
Hans

MelanieB
3StarLounger
Posts: 310
Joined: 19 Apr 2010, 16:18
Location: middle of the state of Washington

Re: Highlight cell if value found in another list

Post by MelanieB »

Thank you!

User avatar
HansV
Administrator
Posts: 78383
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Highlight cell if value found in another list

Post by HansV »

Actually, the formula should hve been


=COUNTIF('Sheet 2'!$D$2:$D$100,A2)>0
Best wishes,
Hans