Formula for multiple match in seperate columns

S

Sinner

I have values in col1

col1
ABC
ABD
ABC
ABC

I have values in col2

col2
ABC
123
456
DEF
ABC

Required result:
A formula for col1 which would give only 2 possible occurances of
'ABC' in col1 as there are only two possible matches in col2. For 3rd
'ABC' and so on in col1, I want a #N/A as there won't be any matches
for those in col2.
 
Top