Highlighting duplicated values in 2 lists using conditional formatting.

INN

Board Regular
Joined
Feb 3, 2021
Messages
124
Office Version
  1. 365
Platform
  1. Windows
Hi
I have 2 lists. I want to compare list 1 with list 2 and if the name in list1 appears in list2 then I want to highlight that name in list1 in red for example but not doing anything to the same name in list2. So I highlighted List1 and then went to Conditional Formatting and wrote this formula

=COUNTIF($B:$B,A1)>1

But it did not work. I also want to do the same thing for List2. Compare names in list2 to names in list1 and if the name appears in List1 then highlight the name in list2 in green for example. Any idea how can I do that. Thank you very much.


List1List2
LindaMike
AdamLiz
AnnaTao
BobJack
TaoJim
Liz
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
There may possibly be an issue with exactly what you had selected when you applied that CF, but the last part of your formula should be

=COUNTIF($B:$B,A1)>0

Here is another approach that you could use

23 06 20.xlsm
AB
1List1List2
2LindaMike
3AdamLiz
4AnnaTao
5BobJack
6TaoJim
7Liz
8
9
10
Dupes
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B10Expression=MATCH(B2,A:A,0)textNO
A2:A10Expression=MATCH(A2,B:B,0)textNO
 
Last edited:
Upvote 1
Solution
Yes, the >0 made the difference and the Match function amazingly worked very well as well. Thank you so much for your help. I appreciate the help
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,994
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top