SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-2279851%22%20slang%3D%22fr-FR%22%3EfUNCTION%20ALLOWING%20to%20check%20the%20value%20of%20a%20letter%20which%20as%20the%20first%20position%20in%20a%20word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279851%22%20slang%3D%22fr-FR%22%3E%3CP%3EHi%20Guys%2C%20i'm%20searching%20in%20excel%20the%20function%20that%20allows%20me%20to%20check%20the%20value%20of%20a%20letter%20that%20has%20got%20the%20first%20position%20in%20a%20word.%20can%20you%20help%20me%20please%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2279851%22%20slang%3D%22fr-FR%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2279865%22%20slang%3D%22en-US%22%3ERe%3A%20fUNCTION%20ALLOWING%20to%20check%20the%20value%20of%20a%20letter%20which%20as%20the%20first%20position%20in%20a%20word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279865%22%20slang%3D%22en-US%22%3EDo%20you%20mean%20you%20are%20trying%20to%20find%20the%20ascii%20value%20of%20the%20first%20letter%20of%20a%20word%3F%3CBR%20%2F%3EIf%20yes%2C%20assuming%20the%20word%20is%20in%20cell%20A2%20then%20try%20this...%3CBR%20%2F%3E%3DCODE(LEFT(A2%2C1))%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2279891%22%20slang%3D%22en-US%22%3ERe%3A%20fUNCTION%20ALLOWING%20to%20check%20the%20value%20of%20a%20letter%20which%20as%20the%20first%20position%20in%20a%20word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279891%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1032378%22%20target%3D%22_blank%22%3E%40WilliamB972%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3D%20LEFT(word%2C%201)%3C%2FP%3E%3CP%3Ereturns%20the%20first%20letter%20of%20the%20word.%26nbsp%3B%20You%20could%20then%20compare%20it%20to%20other%20letters%2C%20or%20use%20it%20in%20formulas%20such%20as%20that%20shown%20by%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3E%26nbsp%3B(returns%20the%20ASCII%20code).%26nbsp%3B%20In%20other%20contexts%2C%20it%20is%20possible%20to%20search%20using%20wildcards%20so%20the%20string%3C%2FP%3E%3CP%3E%3D%20LEFT(word%2C%201)%26amp%3B%22*%22%3C%2FP%3E%3CP%3Emight%20be%20used%20to%20search%20for%20any%20other%20word%20that%20has%20the%20same%20initial%20character%20as%20the%20current%20word.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

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
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))

@WilliamB972 

= 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

@WilliamB972 

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))