2

I'm trying to find out if the 1st letter in a cell is UPPERCASE. I know how to convert case using PROPER(), UPPER(), and LOWER(), but not how to detect case.

The following checks every word in the string and returns false for A1 and true for A2, but I just want to know if the 1st character in the cell is proper, not every word.

=EXACT(PROPER(a1),a1) 

string in cell A1:

hello World

string in cell A2:

Hello World

Any ideas on a formula that will return false for cell A1 and true for cell A2?

4 Answers 4

2

=ARRAYFORMULA(IF(LEN(A1:A); IF(EXACT(UPPER(LEFT(A1:A; 1)); 
                                           LEFT(A1:A; 1)); TRUE; FALSE); ))

3

0
1

=IF(EXACT(UPPER(LEFT(A1; 1)); 
                LEFT(A1; 1)); TRUE; FALSE)

3

1
=IF(REGEXMATCH(A1,"^[A-Z]"),"true","false")

Note, it does work with English uppercase letters, but not with others.

1

I keep finding myself back on this page when searching in Google (basically trying to remember there's an "EXACT" function, so figured I'd add the following somewhat simpler formula to the accepted answer, a tweak to the solution @user0 provided:

=EXACT(UPPER(LEFT(A1,1)),LEFT(A1,1))

Also, if you're trying to simply check if an ENTIRE word is uppercase (this page shows up early on Google results), a modification of this formula also works:

=EXACT(UPPER(A1),A1)

Great if you're working with data from a user base who thinks that caps lock is the only way to complete online forms :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.