further to that if your not sure lay it out like this
=if(a1=x,"its x",
if(a1=y,"its y",
if(a1=z,"its z",
if(a1=p,"its p","a1 doesn't equal anything"
join them all together
=if(a1=x,"its x",if(a1=y,"its y",if(a1=z,"its z",if(a1=p,"its p","a1 doesn't equal anything"
count the number of IFs in this case 4 and put that many ")" at the end
=if(a1=x,"its x",if(a1=y,"its y",if(a1=z,"its z",if(a1=p,"its p","a1 doesn't equal anything"))))