Not very sure on your intents,
but you might be thinking along these lines
Set-up the reference table in say, Sheet2,
cols A and B, from row1 down
Y 2
N 5
Z 9
etc
Then in Sheet1,
if you input letters* in say, A1:A3
Z
Y
N
*assumed case-insensitive
you could put in B1: =VLOOKUP(A1,Sheet2!A:B,2,0)
and copy B1 down to return the numbers
corresponding to the letters in col A
Z 9
Y 2
N 5
Alternatively, if you're entering single alphabets in col A,
then putting in B1: =CODE(A1)
and copying B1 down will also drive out numbers
corresponding to the alphas
(this time, it's case-sensitive, Y = 89, y = 121)
A - Z yields : 65 - 90
a - z yields : 97 - 122