tried this formulae and got the correct answer as "Yes" but when i double click it again it gives me the wrong answer as "No".

=IF(ISNA(INDEX('TB vs. ANET Consol.'!$D$2:$K$166,MATCH(1,('TB vs. ANET Consol.'!$D$2:$D$166=C5)*('TB vs. ANET Consol.'!$E$2:$E$166=D5),0),4)),"Yes","No")

Please help to have the correct answer and a consistent one.