Clean data in Excel with AI, then check it: the "van der Merwe" test
Asking an AI assistant in Excel to tidy a messy customer list is genuinely useful. You type "fix the capitalisation and remove extra spaces", and a few seconds later a column of shouting capitals and stray spaces looks neat.
The catch is that "looks neat" and "is correct" aren't the same thing. In this post you'll see how to clean data in Excel with AI without passing on its mistakes, using a very South African example: what happens to surnames like "van der Merwe", "du Plessis" and "McDonald". You'll finish with a short checklist you can use before a cleaned list goes to a client or your manager.
Where the problem starts: how PROPER works
Most "fix the capitals" cleaning, whether you do it with a formula or an AI assistant does it for you, follows the same rule as Excel's PROPER function. Microsoft describes it like this: PROPER capitalises the first letter of the text and any letter that comes after a character that isn't a letter. Every other letter becomes lowercase.
That rule is brilliant for a list exported in capitals:
| Original | =PROPER(A2) |
|---|---|
| NOMVULA DLAMINI | Nomvula Dlamini |
| priya naidoo | Priya Naidoo |
| SIPHO NDLOVU | Sipho Ndlovu |
| SEAN O'REILLY | Sean O'Reilly |
Even "O'Reilly" comes out right, because the apostrophe counts as a non-letter, so the R after it gets a capital.
Now look at what the same rule does to names that were already correct:
| Original | =PROPER(A2) |
|---|---|
| Pieter van der Merwe | Pieter Van Der Merwe |
| Anika du Plessis | Anika Du Plessis |
| Sean McDonald | Sean Mcdonald |
PROPER doesn't know that "van der" is a surname prefix many families write in lowercase. It sees a space, so it capitalises the next letter. And it doesn't know that the D in McDonald should stay a capital, because it comes after a letter, so it gets lowered.
Why this matters more with AI
When you type =PROPER(A2) yourself, you know what rule you've applied. When an AI assistant cleans a column for you, you only see the finished result. If the list has a few thousand rows, the damaged surnames are scattered through it and easy to miss.
There's also a reason these mistakes slip past people: the output looks tidier than the input. "Van Der Merwe" looks consistent. It only looks wrong to someone who knows the name, and that's often the customer reading their own name on a letter or invoice.
A worked example
Here's a messy list of six customers, the kind you get from a form people filled in on their phones.
| A (original) | B (AI-cleaned) | |
|---|---|---|
| 2 | THABO MOKOENA |
Thabo Mokoena |
| 3 | lindiwe zulu | Lindiwe Zulu |
| 4 | Pieter van der Merwe | Pieter Van Der Merwe |
| 5 | KAREN SMITH | Karen Smith |
| 6 | Anika du Plessis | Anika Du Plessis |
| 7 | Sean McDonald | Sean Mcdonald |
The AI got rows 2, 3 and 5 exactly right. It removed the leading spaces and the extra spaces in the middle, and fixed the capitals. That's the same job as =PROPER(TRIM(A2)).
Rows 4, 6 and 7 were already correct, and the AI made them worse. Half the list is broken, and every damaged row is one that needed no cleaning at all.
How to check AI data cleaning results in Excel
You don't need to read every row. These steps catch most problems quickly.
1. Flag every row that changed
Put a check column next to the cleaned data:
=EXACT(A2,B2)
EXACT returns TRUE only when two cells match character for character, including upper and lower case. Rows that come back FALSE are the ones the AI changed.
Don't use =A2=B2 for this. The equals sign ignores case, so it would say "Pieter van der Merwe" and "Pieter Van Der Merwe" are the same, which is exactly the change you're trying to catch.
2. Look harder at rows that were already tidy
A changed row isn't automatically wrong. Rows 2, 3 and 5 changed because they needed to. The suspicious ones are rows where the original was already in mixed case, like "Pieter van der Merwe", and still changed. Filter the FALSE rows and scan those first.
3. Search for the usual suspects
Use Find (Ctrl+F on Windows, Cmd+F on Mac) to search the cleaned column for patterns that PROPER-style cleaning tends to damage:
- "Van ", "Der ", "Du ", "De ", "Le " (Afrikaans and Dutch prefixes)
- "Mc" and "Mac" (McDonald, MacKenzie)
- Hyphenated or double-barrelled names
4. Go back to the source, not to a rule
Here's the tricky part. Some families do write "Van der Merwe" with a capital V, and some write "Du Plessis". There's no formula that knows which. The correct spelling is whatever the person uses, so the reliable source is the original data, the person's own form, or your client system. If the original was mixed case, it's usually safer to keep it than to trust a rule.
5. Clean only what needs cleaning
A practical fix is to tell the AI assistant more precisely what you want, for example: "Only change names that are all in capitals or all in lowercase. Leave names in mixed case as they are." Then check again with EXACT. A more specific instruction often gives a better result, but you still verify it.
If you're doing it by formula, you can do the same thing yourself. This keeps any name that's already in mixed case and cleans the rest:
=IF(OR(EXACT(A2,UPPER(A2)),EXACT(A2,LOWER(A2))),PROPER(TRIM(A2)),TRIM(A2))
It reads: if the name is all capitals or all lowercase, apply PROPER and TRIM. Otherwise, just remove the extra spaces. Run it on the example above and rows 4, 6 and 7 stay exactly as they were.
A short checklist before you send the list
- Same number of rows before and after?
- EXACT check column added, and the FALSE rows reviewed?
- Prefixes (van, der, du, de, le) and Mc/Mac names searched for?
- Doubtful names checked against the original source?
- Original column kept until someone has signed off the cleaned one?
That last point is worth making a habit. Never overwrite the original until you've checked. If the original is gone, you can't compare, and you can't undo a mistake you only spot next week.
Try it yourself
In lesson 32, Clean data with AI, you'll watch an AI assistant clean a messy list right first time, then over-clean names that were already correct. Your job is to catch it. If you'd like to see how PROPER, UPPER and LOWER behave first, including PROPER(TRIM()), start with lesson 29. Both are free, run in your browser, and need no sign-up.