You can do it without macros by using conditional formatting
(There is an excellent write up of conditional formatting at Debra Dalgleish's site here. In xl2003 conditional formatting is accessed via the Format .. Conditional Formatting menu.)
If your data to be matched was in A1:F10 then these two formulas can be used to
- match column C against F and return the position in F where column C has a match
- compare the values in column D and E in this position to the respective values in columns A and B
- format column A and B for valid matches using
=A1=INDEX(D$1:D$10,MATCH($C1,$F$1:$F$10,0))
- format column A and B for invalid matches using
=A1<>INDEX(D$1:D$10,MATCH($C1,$F$1:$F$10,0))
In the sample below I have added these two conditional formats to cells A1:B10 in xl2010
A valid match is green
Invalid matches are red
Non matches are not formatted
So A1 and B1 are green as they match D2 (Mr) and E2 (Jones) for a common value of 1 in C1 and F2
So A3 is green as it matches D1 (Father) for 10 in C3 and F1, but B3 is red as E1 does not contain "wang"