Sub topic 10
Where PROPER gets names and abbreviations wrong
This chapter assumes you can enter and copy formulas, use relative references such as A2, and tell text from numbers. It also assumes you have already used PROPER on a column of text.
What PROPER actually does
PROPER capitalizes the first letter of the text and any letter that follows a non-letter character. It lowercases every other letter. The function has no list of names or abbreviations. It looks only at the character just before each letter.
That rule works for ordinary words and for hyphenated names such as "smith-jones", which becomes "Smith-Jones". It fails when the correct capitalization is not "first letter up, rest down".
Common wrong results
| Original | `=PROPER(A2)` returns | Problem |
|---|---|---|
| it's | It'S | A letter after an apostrophe is capitalized |
| MCDONALD | Mcdonald | The internal capital is lost |
| USA | Usa | Abbreviations lose their capitals |
| 3rd floor | 3Rd Floor | A letter after a digit is capitalized |
| iPhone | Iphone | Brand-specific casing is lost |
| van der Berg | Van Der Berg | Lowercase name particles are capitalized |
| Acme llc | Acme Llc | Legal suffixes lose their capitals |
The apostrophe rule also helps in some cases. "o'sullivan" becomes "O'Sullivan", which is correct, and "it's" becomes "It'S", which is wrong. No single rule fits both, so you have to decide which exceptions matter in your data.
Fixing a known pattern with SUBSTITUTE
When you know which errors occur, wrap PROPER in SUBSTITUTE to repair them. This formula fixes the possessive and contraction problem:
=SUBSTITUTE(PROPER(A2),"'S","'s")It also changes "O'Sullivan" if the name appears as "O'Sullivan's" or a similar form, and it changes any name where an apostrophe is followed by S, such as "D'Souza" (which becomes "D'souza"). Check the results before you rely on the formula.
Ordinal numbers need a different fix, because the letter after the digit is the problem:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(PROPER(A2),"1St","1st"),"2Nd","2nd"),"3Rd","3rd"),"Th ","th ")The last step also changes real words that end in "Th" and are followed by a space, so use it only on data you have looked at.
Restoring abbreviations safely
SUBSTITUTE is case-sensitive and matches text anywhere in a cell. If you replace "Llc" with "LLC", a word such as "Llcarna" would also change. Adding a space on each side limits the match to whole words:
=TRIM(SUBSTITUTE(" "&PROPER(A2)&" "," Llc "," LLC "))The formula adds a space at both ends, replaces the whole word, and then TRIM removes the added spaces. Nest more SUBSTITUTE calls for other abbreviations such as " Usa " or " Uk ".
Fixing prefixes such as Mc
A prefix fix needs a test of the first letters. Assume B2 already holds the PROPER result:
=IF(LEFT(B2,2)="Mc","Mc"&UPPER(MID(B2,3,1))&MID(B2,4,100),B2)If the text starts with "Mc", the formula keeps those two letters, capitalizes the third, and appends the rest. Otherwise it returns the value unchanged. This works on a single name at the start of a cell. It does not fix "Mc" inside a full name such as "Anna Mcdonald", and "Macdonald" is ambiguous because not every "Mac" name has a capital after it.
Choosing an approach
Use these rules to decide how far to go:
- For a short list, run
PROPERand correct the wrong cells by hand. - For a few repeating patterns, add
SUBSTITUTEorIFfixes in a helper column. - For a large or recurring list of exceptions, keep the exceptions in a two-column table and apply them with Power Query or a lookup. The next chapters cover alternatives.
- If the original capitalization was already correct, do not run
PROPERat all. Cleaning withTRIMandCLEANalone leaves it untouched.
A useful check is to compare the cleaned column with the original using =EXACT(A2,B2). Rows that return FALSE show every place the formula changed the text, so you can scan them for wrong changes.
Exercise
A column contains the text "ACME USA LLC". After =PROPER(A2) it reads "Acme Usa Llc". Write a formula that returns "Acme USA LLC" and does not change other words that merely contain "Usa" or "Llc".
Show answer
=TRIM(SUBSTITUTE(SUBSTITUTE(" "&PROPER(A2)&" "," Usa "," USA ")," Llc "," LLC "))