Spreadsheet Practice

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 to B7
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.

=EXACT(A2,UPPER(A2))

ResultTRUE

  1. A2"MN"

    The value in A2.

  2. UPPER(A2)"MN"

    UPPER: Converts to uppercase.

    • textA2"MN"
  3. EXACT(A2,UPPER(A2))TRUE

    EXACT: TRUE if two texts match exactly, including case.

    • text1A2"MN"
    • text2UPPER(A2)"MN"

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.

FormulaResultWhen to use it
=IF(EXACT(A2,UPPER(A2)),"OK","Fix case")OK, Fix case, OK…Different resultA label for a review column. Shows "OK" or "Fix case".
=REGEXMATCH(A2,"^[A-Z]+$")Google SheetsTRUE, 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

In 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.