How to check if text is all uppercase in Excel
Formula (Excel and Google Sheets)
=EXACT(A2,UPPER(A2))Compare the text with its uppercase version using EXACT: =EXACT(A2,UPPER(A2)) returns TRUE when every letter is a capital.
- Result on the example
- one result per row in
B2, filled down toB7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B7. Change any input and the result updates, or edit the formula to experiment.
How it works
UPPER(A2) is what the text would look like in all caps. If the text is already in all caps, the two are identical and EXACT returns TRUE. EXACT is needed because the = sign ignores case: A2=UPPER(A2) is always TRUE.
In Google Sheets
The same formula works in Google Sheets: =EXACT(A2,UPPER(A2)). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF(EXACT(A2,UPPER(A2)),"OK","Fix case") | OK, Fix case, OK…Different result | A label for a review column. Shows "OK" or "Fix case". |
| =REGEXMATCH(A2,"^[A-Z]+$")Google Sheets | TRUE, FALSE, TRUE… | Google Sheets: true only when the text is capital letters A to Z and nothing else. |
Common mistakes
- Text with no letters, like "123", counts as uppercase, because UPPER doesn't change it.
- Using = instead of EXACT makes every row TRUE.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Check if text is all uppercase
B2, return TRUE when the state code is entirely in capital letters and FALSE otherwise. Fill down to B7.Questions
How do I check for all lowercase?
Compare with LOWER: =EXACT(A2,LOWER(A2)).
How do I count the cells that aren't in capitals?
Use =SUMPRODUCT(--NOT(EXACT(A2:A7,UPPER(A2:A7)))).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.