Almost every HR report starts with an export from a payroll or HR system, and almost every export has the same problems: names in capitals, extra spaces, dates Excel does not recognise, the same department spelt four ways, and people listed twice. Until these are fixed, every count, lookup and total built on the list is unreliable. This guide shows you how to clean an employee list in Excel step by step, without retyping anything.

The golden rule: never clean the original

Paste the export onto a sheet called Raw and leave it untouched. Build clean versions of each column next to it with formulas. When the cleaning is done, copy the clean columns and paste them as values onto a new sheet. If something goes wrong, the original is still there.
A B C D
1 Emp no Name Department Start date
2 E001 rudo CHIKWANHA Finance 03/02/2019
3 E002 nyasha dube admin 01/04/2026
4 E003 Tatenda Gumbo Operations 15/06/2021
5 E002 Nyasha Dube Administration 01/04/2026
6 E005 Kudzai Mutasa Ops
Raw Map
Figure 1: A typical messy export. Can you spot all eight problems?
Look closely: extra spaces before and after a name, a double space inside another, names in mixed capitals, “admin” and “Ops” instead of the full department names, a space after “Operations”, an employee listed twice and a missing start date. The dates may also be text, not real dates.

Step 1: Fix names (spaces and capitals)

In F2 type:
=PROPER(TRIM(B2))
TRIM removes spaces at the start and end and turns double spaces in the middle into single spaces. PROPER then capitalises the first letter of each word. “  rudo CHIKWANHA ” becomes “Rudo Chikwanha”. PROPER is not perfect with names like “McDonald” or “van der Merwe”, so scan the results quickly.

Step 2: Standardise department names

Create a small mapping sheet called Map. In column A list every spelling that appears in your data; in column B write the correct name:
A B
1 As exported Correct name
2 admin Administration
3 Administration Administration
4 Finance Finance
5 Ops Operations
6 Operations Operations
Raw Map
Figure 2: The Map sheet. Add a row whenever a new spelling appears.
Then in G2:
=IFERROR(VLOOKUP(TRIM(C2),Map!A:B,2,FALSE),"Not mapped")
VLOOKUP ignores upper and lower case, so “admin” and “Admin” both match. TRIM removes the stray space after “Operations ”. Anything that shows Not mapped is a new spelling to add to the Map sheet.

Step 3: Turn text dates into real dates

Dates exported as text look right but will not sort, filter or calculate. The quick test: real dates line up on the right of the cell, text lines up on the left. For text in day/month/year order (such as 03/02/2019), use this formula in H2. It works on any computer, whatever its regional settings:
=IF(D2="","",DATE(RIGHT(D2,4),MID(D2,4,2),LEFT(D2,2)))
It takes the year from the last four characters, the month from the middle and the day from the start, then builds a proper date. Format column H as a date. Be careful with DATEVALUE: it reads text using your computer’s date settings and can swap the day and month.

Step 4: Flag duplicates and missing data

In I2, flag any employee number that appears more than once:
=IF(COUNTIF($A$2:$A$6,A2)>1,"Duplicate","")
In J2, flag rows with an empty cell:
=IF(COUNTBLANK(A2:D2)>0,"Missing data","")
Change $A$2:$A$6 to cover your whole list. Do not delete duplicates automatically: check which row is correct first, because the two rows may hold different details.

The result

F2fx=PROPER(TRIM(B2))
A B C D E F G H I J
1 Emp no Name Department Start date Clean name Clean department Clean date Duplicate? Missing?
2 E001 rudo CHIKWANHA Finance 03/02/2019 Rudo Chikwanha Finance 03/02/2019
3 E002 nyasha dube admin 01/04/2026 Nyasha Dube Administration 01/04/2026 Duplicate
4 E003 Tatenda Gumbo Operations 15/06/2021 Tatenda Gumbo Operations 15/06/2021
5 E002 Nyasha Dube Administration 01/04/2026 Nyasha Dube Administration 01/04/2026 Duplicate
6 E005 Kudzai Mutasa Ops Kudzai Mutasa Operations Missing data
Raw Map
Figure 3: Raw data on the left, clean columns on the right. E002 is listed twice and E005 has no start date.
Every name and department is now consistent, and the two problems a formula cannot solve on its own, the duplicate and the missing date, are flagged for a person to resolve.

Step 5: Replace the original with clean values

    1. Select the clean columns (F to H) and copy them.
    1. On a new sheet, right-click and choose Paste Special → Values. This keeps the results and drops the formulas.
    1. Resolve the flagged duplicates and missing data.
    1. Use this clean sheet for your reports, such as staff turnover or leave balances.

Common mistakes to avoid

    • Cleaning by retyping. It is slow and creates new errors. Use formulas, then paste values.
    • Using Remove Duplicates before checking. It keeps the first row it finds, which may be the wrong one.
    • Trusting DATEVALUE blindly. On a computer set to US format, 03/02 becomes 2 March instead of 3 February.
    • Missing non-breaking spaces. Data copied from websites can contain spaces TRIM does not remove. Use Find and Replace, typing Alt+0160 in the Find box.
    • Cleaning the same export every month by hand. Keep your Map sheet and formulas in a template and reuse them.
DO IT IN 2 MINUTES

Skip the setup: use our ready-made cleaner

The Staff List Cleaner fixes names, departments and dates, flags duplicates and missing data, and gives your list a quality score. Paste your export and it’s done.

Get the Staff List Cleaner Get the full HR & Payroll Analysis Toolkit ($35)

Next steps

With a clean list you can build reliable reports. Try How to compare two months of payroll in Excel, or find more tools in Excel for Professionals.