What is in A1, A4 and A5? Is this the sort of thing you're looking for?
<TABLE cellSpacing=0 border=1><TBODY><TR vAlign=bottom><TH width=22 bgColor=#b0b0b0> </TH><TH align=middle width=62 bgColor=#b0b0b0>
A</TH><TH align=middle width=62 bgColor=#b0b0b0>
B</TH><TH align=middle width=62 bgColor=#b0b0b0>
C</TH></TR><TR vAlign=bottom><TH align=middle bgColor=#b0b0b0 height=12>
1</TH><TD>pies</TD><TD> </TD><TD>Yes</TD></TR><TR vAlign=bottom><TH align=middle bgColor=#b0b0b0 height=12>
2</TH><TD> </TD><TD> </TD><TD> </TD></TR><TR vAlign=bottom><TH align=middle bgColor=#b0b0b0 height=12>
3 </TH><TD> </TD><TD> </TD><TD> </TD></TR><TR vAlign=bottom><TH align=middle bgColor=#b0b0b0 height=12>
4 </TH><TD>pi</TD><TD> </TD><TD> </TD></TR><TR vAlign=bottom><TH align=middle bgColor=#b0b0b0 height=12>
5 </TH><TD>es</TD><TD> </TD><TD> </TD></TR></TBODY></TABLE>
If it is, then =IF(A1=A4&A5,"Yes","No")
If it's not, please give more info. Ta