Menu

How to Capitalize in Excel: UPPER, LOWER and PROPER

=UPPER(A2) capitalizes all letters in A2, =LOWER(A2) makes them all lowercase, and =PROPER(A2) capitalizes the first letter of each word. For only the first letter of the text, combine UPPER, LEFT and MID.

Every sheet on this page is live: change a number or a formula and it recalculates.

=UPPER(A2) returns the text in A2 with every letter capitalized. =LOWER(A2) makes every letter lowercase, and =PROPER(A2) capitalizes the first letter of each word and lowercases the rest.

Three ways to change case
B2
ABCD
1TextUPPERLOWERPROPER
2ana silvaANA SILVAana silvaAna Silva
3BEN OKAFORBEN OKAFORben okaforBen Okafor
4cHEN wUCHEN WUchen wuChen Wu
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Digits, spaces and punctuation pass through unchanged. All three functions work in every Excel version and in Google Sheets.

Excel has no Change Case button like Word's Shift+F3, so a formula is the usual way. To replace the original text with the result, see the last section.

Capitalize the first letter only

There is no SENTENCE function. Build it from pieces: UPPER on the first character, then the rest from MID:

Sentence case
B2
ABC
1TextFirst letter, rest lowercaseFirst letter, rest unchanged
2hELLO wORLDHello worldHELLO wORLD
3order from NASAOrder from nasaOrder from NASA
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Column B lowercases everything after the first letter, which also turns NASA into nasa. Column C leaves the rest as it was. LEN(A2) is used as "the rest of the text": MID never returns more characters than there are.

Fix the first letter
B2
AB
1CommentFixed
2pAYMENT RECEIVED
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Your turn: In B2, capitalize the first letter of the text in A2 and make the rest lowercase.

PROPER's quirks: McDonald, O'Neil and 3rd

PROPER capitalizes the first letter of the text and every letter that follows a character that is not a letter. That rule is right for most names and wrong for some:

What PROPER does to tricky text
B2
AB
1TextPROPER
2o'neilO'Neil
3mary-annMary-Ann
4mcdonald'sMcdonald'S
53rd floor3Rd Floor
6USA todayUsa Today
7mcdonaldMcdonald
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.
  • o'neil and mary-ann come out right, as O'Neil and Mary-Ann.
  • mcdonald's becomes Mcdonald'S: the S after the apostrophe is capitalized. =SUBSTITUTE(PROPER(A2),"'S","'s") fixes that pattern.
  • 3rd becomes 3Rd and USA becomes Usa: PROPER lowercases everything that is not a first letter.
  • mcdonald becomes Mcdonald, not McDonald. PROPER cannot know where a name has a second capital; such names need a manual fix or a lookup table of exceptions.

Case-sensitive comparison with EXACT

Excel ignores case when it compares text: ="ANA"="ana" is TRUE, and so are COUNTIF, VLOOKUP and XLOOKUP matches. When case matters, for codes like ab12 and AB12, use EXACT:

Equal, but not exactly
C2
ABCD
1CodeTypedA=BEXACT
2AB12ab12TRUEFALSE
3AB12AB12TRUETRUE
4Xy-7XY-7TRUEFALSE
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

For a case-sensitive lookup, give XLOOKUP the TRUE/FALSE list that EXACT returns for the whole column: =XLOOKUP(TRUE,EXACT(A2:A10,F2),B2:B10) finds ab12 but not AB12 (Excel 2021 and Microsoft 365).

Lowercase email addresses
B2
AB
1Typed emailStored email
2Ana.Silva@Coddy.TECH
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Your turn: Email addresses should be stored in lowercase. In B2, return the address in A2 in lowercase.

Replace the text with the new case

The formula writes its result in another column. To change the original cells:

  1. Put =UPPER(A2) (or LOWER, or PROPER) in an empty column and fill it down.
  2. Copy that column with Ctrl+C (Cmd+C on a Mac).
  3. Select the original column and use Home > Paste > Paste Values.
  4. Delete the helper column.

Flash Fill is a shortcut for simple cases: type the first value in the case you want next to the original, press Enter, then press Ctrl+E or use Data > Flash Fill. It copies the pattern to the other rows as fixed text. Check the result on names like McDonald, where the pattern is not obvious.

Frequently Asked Questions

How do I capitalize all letters in Excel?

Use =UPPER(A2) in another column, fill it down, then copy the results and use Home > Paste > Paste Values over the original. Excel has no Change Case button, unlike Word.

How do I capitalize only the first letter in Excel?

=UPPER(LEFT(A2,1))&LOWER(MID(A2,2,LEN(A2))) capitalizes the first letter and lowercases the rest. To leave the rest as it is, drop the LOWER: =UPPER(LEFT(A2,1))&MID(A2,2,LEN(A2)).

Why does PROPER capitalize the letter after an apostrophe?

PROPER capitalizes every letter that follows a character that is not a letter, so mcdonald's becomes Mcdonald'S. Fix the common case with =SUBSTITUTE(PROPER(A2),"'S","'s").

How do I do a case-sensitive lookup in Excel?

Lookups ignore case, so match with EXACT: =XLOOKUP(TRUE,EXACT(A2:A10,F2),B2:B10) returns the row where A matches F2 letter for letter, capitals included (Excel 2021 and Microsoft 365).

Coddy programming languages illustration

Learn to code with Coddy

GET STARTED