 SOLVED

# fUNCTION ALLOWING to check the value of a letter which as the first position in a word

Hi Guys, i'm searching in excel the function which allows me to check the the value of a letter which has got the first position in a word. can you help me please ?

7 Replies

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

Do you mean you are trying to find the ascii value of the first letter of a word?
If yes, assuming the word is in cell A2 then try this...
=CODE(LEFT(A2,1))

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

= LEFT(word, 1)

returns the first letter of the word.  You could then compare it to other letters, or use it in formulas such as that shown by @Subodh_Tiwari_sktneer (returns the ASCII code).  In other contexts, it is possible to search using wildcards so the string

= LEFT(word, 1)&"*"

might be used to search for any other word that has the same initial character as the current word.

best response confirmed by WilliamB972 (Occasional Contributor)
Solution

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

As a comment

=CODE(LEFT(A2,1))

and

=CODE(A2)

both return the same value.

I personally always prefer to use UNICODE(), but in most cases that doesn't matter.

That could be the basis for other manipulations. For example, to check if first character is alphabet character or not (only for English)

``=CHAR(BITXOR(CODE(A2),32))=CHAR(CODE(A2))``

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

Thank you so much Peter @Peter Bartholomew

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

Thank you so much Sergei

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

Thank you so much Peter

# Re: fUNCTION ALLOWING to check the value of a letter which as the first position in a word

Thank you so Much Subodh