This formula will work only if the workbook has a cell named x and another named y.
Try this:
In A1 enter the text x , in B1 the value 4
In A2 enter the text y , in B2 the value 6
Select A1:B2; on the Formulas tab, use Create from Selection (see snip)
Now IF(x=y, "yes", "no") will work
best wishes