just looking quickly at this, it seems you have Z25 formula the wrong way round.

atm, when Y25 DOES NOT EQUAL AA25, show O, otherwise show X
P.S. surely is would be easier to put =if(Y25=AA25,"O","X")