Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if character is upper or lower case

Status
Not open for further replies.

emikoo

Technical User
Jul 12, 2002
37
0
0
NL
Hello,

I want to check if a character in a certain cell is upper or lower case. For example "A" returns "Upper", "a" returns "Lower".

Thnxs in advance,

EK
 
=code(cell_address) will give you 65 if the first letter in the cell is A or 97 if it's a.
 
To build on that...

=IF(ISERROR(CODE(A1)),&quot;&quot;,IF(OR(CODE(A1)<65,CODE(A1)>122),&quot;Non Alpha&quot;,IF(AND(CODE(A1)>=65,CODE(A1)<=90),&quot;Upper&quot;,&quot;Lower&quot;)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top