How-to recipes · Text

How to capitalize the first letter in Excel

Capitalise the first letter of every word with PROPER, or only the first letter of the text (sentence case) with UPPER, LEFT, LOWER and MID.

Beginner PROPER UPPER LOWER LEFT MID LEN REPLACE

Names typed in lower case, product titles in shouting capitals, comments copied from a form with random case: inconsistent capitalisation makes a list look careless and can break sorting and matching in other systems. Excel has three case functions, UPPER, LOWER and PROPER, but none of them produces sentence case, where only the first letter of the text is capital. This recipe shows how to get every common style, and where PROPER gets things wrong.

The example data

Four texts in A2:A5 with different case problems.

Capitalise every word: PROPER

PROPER makes the first letter of each word upper case and all other letters lower case:

C3fx=PROPER(A3)
ABC
1Text
2the invoice is overdue
3mARIA lOPEZMaria Lopez
42nd floor, block b
5PLEASE CALL BACK

The randomly cased name is fixed in one step.

Result: Maria Lopez

This is the right tool for names, cities and titles. It works in every version, and in Microsoft 365 a single =PROPER(A2:A5) spills the whole column.

Watch out. PROPER capitalises any letter that follows a non-letter, including digits and apostrophes. 2nd floor, block b becomes 2Nd Floor, Block B, and don't becomes Don'T. Check the results for numbers with suffixes, contractions and names such as McDonald (PROPER gives Mcdonald).

Capitalise only the first letter: sentence case

Combine LEFT for the first character with MID for the rest:

C2fx=UPPER(LEFT(A2,1))&LOWER(MID(A2,2,LEN(A2)))
ABC
1Text
2the invoice is overdueThe invoice is overdue
3mARIA lOPEZ
42nd floor, block b
5PLEASE CALL BACK

The first character is made upper case and everything else lower case.

Result: The invoice is overdue

  1. LEFT(A2,1) takes the first character and UPPER capitalises it.
  2. MID(A2,2,LEN(A2)) takes everything from the second character to the end; using the full length as the count is a safe way to say the rest.
  3. LOWER makes the rest lower case, and & joins the two parts.

Applied to PLEASE CALL BACK the same formula gives Please call back. If the rest of the text has intentional capitals that you want to keep, such as names or abbreviations, leave out LOWER: =UPPER(LEFT(A2,1))&MID(A2,2,LEN(A2)) changes only the first letter.

Microsoft 365: the whole column at once

C2fx=UPPER(LEFT(A2:A5,1))&LOWER(MID(A2:A5,2,LEN(A2:A5)))
ABC
1Text
2the invoice is overdueThe invoice is overdue
3mARIA lOPEZMaria lopez
42nd floor, block b2nd floor, block b
5PLEASE CALL BACKPlease call back

One formula, four results. Note that sentence case turns the name into Maria lopez, so use PROPER for names.

Another way to write the same thing uses REPLACE to swap only the first character: =REPLACE(LOWER(A2),1,1,UPPER(LEFT(A2,1))). Choose whichever you find easier to read.

Leading spaces break it

If the text starts with a space, LEFT returns the space and the first letter stays small. Wrap the source in TRIM: =UPPER(LEFT(TRIM(A2),1))&LOWER(MID(TRIM(A2),2,LEN(A2))). See How to remove spaces in Excel.

Without formulas: Flash Fill

Type the corrected version of the first text in the next column, select the cell below and press Ctrl+E. Flash Fill learns the capitalisation pattern from your example. It handles simple cases well, but check a few rows, especially those with numbers or names.

Replacing the original text

All formulas create a corrected copy. To overwrite the original column: copy the formula results, select the original cells, and choose Home > Paste > Values. Then delete the helper column. Excel has no Change Case button like Word; if you need that often, a short macro can loop over the selection and apply StrConv(cell.Value, vbProperCase), which is explained in Working with text (strings) in VBA.

Pitfalls

  • Names with particles (van, de, von) should often stay lower case: PROPER makes them Van and De. Fix them afterwards with SUBSTITUTE, for example =SUBSTITUTE(PROPER(A2)," Van "," van ").
  • Abbreviations such as VAT, USA or IBAN become Vat, Usa, Iban with PROPER and vat with sentence case. Keep a short list of exceptions to fix.
  • Sentence case is per cell, not per sentence. A cell with two sentences only gets the first one capitalised.
  • Languages. UPPER and LOWER handle accented letters correctly (é to É), but locale-specific rules, like the Turkish dotted I, are not applied.
Tip. Capitalisation is often fixed together with joining names: How to combine first and last name in Excel. Text functions are covered in Text cleanup: TRIM, CLEAN, TEXTSPLIT, Flash Fill and Text to Columns.
⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

More how-to recipes