Try

=IF(AND(A12=9599,F12="Linkjoping"),"YES","NO")

i.e, A12 is NOT text but formatted as GENERAL or NUMBER