How to get the nth letter of the alphabet

Is there a short formula for getting the nth letter of the alphabet?

For example, if I pass a parameter to a 5function, I would get a letter e.

+5
source share
5 answers

There is a function CHARthat gives a character with the specified code:

CHAR(96 + 5)

will give your "e".

But there is no direct way to get an alphabet character.

+16
source

An alternative, although not as short as the CHAR function , is the SELECT function

=CHOOSE(5,"a","b","c","d","e","f","g","h","I","j","k","l","m",
        "n","o","p","q","r","s","t","u","v","w","x","y","z")

'5' . Excel, . (1: 26).

, #VALUE!

+2

ascii, ascii

, ... T-SQL ASCII CHAR:

PRINT CHAR (ASCII ('A') + @i) - @i -

0

: CHAR(CODE("A")+TRUNC(RAND()*26)).

0

(, C3), .

=IF(AND(CODE(C3)>=65,CODE(C3)<=90),CODE(C3)-64,IF(AND(CODE(C3)>=97,CODE(C3)<=122),CODE(C3)-96,"Error"))
0

All Articles