Proper Case That Handles Exceptions

Excel Formulas › Text

All versionsPROPERSUBSTITUTE

PROPER title-cases text but mangles real-world names — “McDonald” becomes “Mcdonald,” “O’Brien” loses its cap, “IBM” turns into “Ibm.” Wrap PROPER in SUBSTITUTE to patch the known exceptions and get clean, correct capitalization.


Quick formula: to title-case A2 but fix “Mc” names:
=SUBSTITUTE(PROPER(A2), "Mcd", "McD")
PROPER does the bulk; each SUBSTITUTE repairs one pattern PROPER got wrong.

Functions used (tap for the full reference guide):

The example

PROPER alone vs PROPER with exception fixes.

ABC
1RawPROPERFixed
2RONALD MCDONALDRonald McdonaldRonald McDonald
3mary o'brienMary O'BrienMary O'Brien

The formula

PROPER, then a SUBSTITUTE to fix “Mc” names:

=SUBSTITUTE(PROPER(A2), "Mcd", "McD") // "Mcdonald" → "McDonald"

How it works

Bulk-fix with PROPER, then patch the exceptions:

  1. PROPER(A2) capitalizes the first letter of every word — getting 95% right but breaking patterns with internal capitals.
  2. Each SUBSTITUTE repairs one known issue: "Mcd" → "McD" restores the capital D in “McDonald.”
  3. Stack more SUBSTITUTEs for other patterns — "Macd" → "MacD", fixing “Ii” back to “II,” etc.
  4. Note PROPER already handles O’Brien correctly (it capitalizes after the apostrophe) — only patch what’s actually wrong for your data.

There’s no perfect formula for names. Capitalization rules are genuinely ambiguous (van der Berg? MacLeOd?). Patch the exceptions that appear in your data; for messy international names, a manual review or a dedicated tool beats chasing every edge case.

Try it: interactive demo

Live demo

Type a name; compare PROPER with the Mc-fixed version.

PROPER:   Fixed:

Variations

Fix multiple patterns

Nest SUBSTITUTEs:

=SUBSTITUTE(SUBSTITUTE(PROPER(A2),"Mcd","McD"),"Macd","MacD")

Keep acronyms uppercase

Repair a known acronym after PROPER:

=SUBSTITUTE(PROPER(A2), "Ibm", "IBM")

Just first-letter-of-sentence

Capitalize only the first character:

=UPPER(LEFT(A2,1)) & LOWER(MID(A2,2,LEN(A2)))

Pitfalls & errors

PROPER breaks internal capitals and acronyms. McDonald, MacLeod, IBM, PhD — all need patching. SUBSTITUTE fixes the specific ones you hit.

SUBSTITUTE is case-sensitive, which is what makes the patch work — it targets PROPER’s exact wrong output ("Mcd").

Order can matter when patterns overlap. Test on your real data, and apply the more specific fixes first.

Practice workbook

📊
Download the free Proper Case That Handles Exceptions practice workbook
Names with PROPER vs the SUBSTITUTE-fixed version (results shown), the multi-pattern and acronym variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I fix PROPER capitalizing names like McDonald wrong?
Wrap PROPER in SUBSTITUTE to repair the pattern: =SUBSTITUTE(PROPER(A2), "Mcd", "McD") restores the capital D. Stack more SUBSTITUTEs for other exceptions.
How do I keep acronyms uppercase after PROPER?
Patch the specific acronym: =SUBSTITUTE(PROPER(A2), "Ibm", "IBM") fixes IBM after PROPER lowercases it.
Is there a perfect formula for name capitalization?
No. Capitalization rules are ambiguous, so PROPER plus targeted SUBSTITUTEs handles the exceptions in your data; messy international names may need manual review.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Capitalize names (proper case) · Clean up messy text · Find and replace text

Function references: PROPER · SUBSTITUTE