Compare data in three sets of columns, highlight non matches

valmir

Active Member
Joined
Feb 10, 2021
Messages
267
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone
I have three sets of data of two columns each (names and numbers)
First set of two columns has nothing to compare with. Second set compares to the first. Third set compares to the second.
If any row in second set has no match in any row in the first set, it must be highlighted. If any If any row in third set has no match in any row in the second set, it must be highlighted.
Solution should be generic (no specific names) as I intend to use it across other similar data.
I am attaching a sample file in which I have manually highlighted the data, with my intended outcome.
Top Scorers.xlsx
ABCDEFGH
1Richard3Daniel3Richard5
2James2Richard3Donald4
3Charles1James2Daniel3
4Christopher1Robert2James3
5Daniel1Andrew1Claude2
6David1Anthony1David2
7John1Charles1Mark2
8Joseph1Christopher1Robert2
9Michael1David1William2
10Robert1Donald1Andrew1
11Thomas1John1Anthony1
12William1Joseph1Ben1
13Mark1Bryan1
14Michael1Charles1
15Paul1Christopher1
16Steven1George1
17Thomas1Jason1
18William1John1
19Joseph1
20Joshua1
21Kevin1
22Malcom1
23Martin1
24Michael1
25Paul1
26Steven1
27Thomas1
Scorers
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
How about:

Book1
ABCDEFGH
1Richard3Daniel3Richard5
2James2Richard3Donald4
3Charles1James2Daniel3
4Christopher1Robert2James3
5Daniel1Andrew1Claude2
6David1Anthony1David2
7John1Charles1Mark2
8Joseph1Christopher1Robert2
9Michael1David1William2
10Robert1Donald1Andrew1
11Thomas1John1Anthony1
12William1Joseph1Ben1
13Mark1Bryan1
14Michael1Charles1
15Paul1Christopher1
16Steven1George1
17Thomas1Jason1
18William1John1
19Joseph1
20Joshua1
21Kevin1
22Malcom1
23Martin1
24Michael1
25Paul1
26Steven1
27Thomas1
28
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D:D,G:GExpression=AND(COUNTIFS(A:A,D1,B:B,E1)=0,D1<>"")textNO
 
Upvote 0
Solution
For col D how about
Excel Formula:
=AND($D1<>"",COUNTIFS($A:$A,$D1,$B:$B,$E1)=0)
 
Upvote 0
How about:

Book1
ABCDEFGH
1Richard3Daniel3Richard5
2James2Richard3Donald4
3Charles1James2Daniel3
4Christopher1Robert2James3
5Daniel1Andrew1Claude2
6David1Anthony1David2
7John1Charles1Mark2
8Joseph1Christopher1Robert2
9Michael1David1William2
10Robert1Donald1Andrew1
11Thomas1John1Anthony1
12William1Joseph1Ben1
13Mark1Bryan1
14Michael1Charles1
15Paul1Christopher1
16Steven1George1
17Thomas1Jason1
18William1John1
19Joseph1
20Joshua1
21Kevin1
22Malcom1
23Martin1
24Michael1
25Paul1
26Steven1
27Thomas1
28
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D:D,G:GExpression=AND(COUNTIFS(A:A,D1,B:B,E1)=0,D1<>"")textNO
Hi Eric! I used the exact same formula in G1 but it highlights only up until row 16. Meaning I didn't get the result you've shown. Do I have to change anything in the formula?
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0
How about:

Book1
ABCDEFGH
1Richard3Daniel3Richard5
2James2Richard3Donald4
3Charles1James2Daniel3
4Christopher1Robert2James3
5Daniel1Andrew1Claude2
6David1Anthony1David2
7John1Charles1Mark2
8Joseph1Christopher1Robert2
9Michael1David1William2
10Robert1Donald1Andrew1
11Thomas1John1Anthony1
12William1Joseph1Ben1
13Mark1Bryan1
14Michael1Charles1
15Paul1Christopher1
16Steven1George1
17Thomas1Jason1
18William1John1
19Joseph1
20Joshua1
21Kevin1
22Malcom1
23Martin1
24Michael1
25Paul1
26Steven1
27Thomas1
28
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D:D,G:GExpression=AND(COUNTIFS(A:A,D1,B:B,E1)=0,D1<>"")textNO
Thanks a lot Eric. It works perfectly!
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,107
Members
453,021
Latest member
Justyna P

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