.
Presuming your data is in A1, paste this in B1 :
Code:
=IF(A1="","",(IF(A1="Y","5",IF(A1="NA","5",IF(A1="N","0")))))
The formula does not check for anything other than Y, 5 & 0. Anything else will
create a FALSE statement in B1. If A1 is blank, B1 will be blank as well.