Lists of customers, orders and survey answers get messier from the moment you collect them. Cleaning in a fixed order prevents most mistakes before analysis or upload. Here is a sequence you can reuse.
Protect the original and look around
The first step is to keep the original safe. Copy the file, work on the copy and never touch the source. Then scan the whole table to learn which columns exist and what kind of values they hold.
Opening the file in a CSV viewer and checking the top, middle and bottom quickly shows whether the header is right and whether a total row or blank lines are attached at the end.
Work on a copy and put a date in the file name
Confirm that the column names sit on exactly one row
Look at the last rows for totals or notes
Spaces and invisible characters
The most common problem is spaces around a value. "Hana" and "Hana " look identical to a person but are different values to a program. There may also be double spaces inside, or line breaks hidden in text pasted from elsewhere.
These differences later break duplicate checks, sorting and searching all at once. So the right order is to remove stray spaces before changing formats.
Trim leading and trailing spaces, collapse repeated spaces to one
Decide whether line breaks inside a cell are really needed
Suspect special or wide spaces that cannot be seen
Unify formats
When the same meaning is written in several shapes, counting and merging become hard. Dates such as 2024-01-05, 24.1.5 and 1/5 mixed together, or phone numbers with and without hyphens, are typical examples.
Decide one standard shape for each column and convert everything to it. Remember that codes with leading zeros should be treated as text.
Use a single date layout, year then month then day
Unify capitalization and spelling variants
Check that number columns have no units, thousands separators or letters mixed in
Keep codes and phone numbers as text
Finding and removing duplicates
Real duplicates only show up after spaces and formats are consistent. In the wrong order, the same person stays on two lines. You also need a rule: are rows duplicates only when the whole line matches, or when a single column such as the email matches?
The remove duplicates tool on this site keeps one row for each value found in the column you choose. Before deleting, check how many rows will disappear and decide which one to keep, the first or the last.
Choose a key column with unique values, such as email or order number
Decide which row survives: earliest or most recent
Check that the number removed matches your expectation
Blanks and a final review
An empty cell can mean there is no information or that someone forgot to enter it. Do not treat all blanks the same; judge by what the column means. Rows missing a required column are safer to collect separately for review.
Finally, compare the row count before and after, and check a few random rows against the original. Opening the result in the viewer and confirming that every row has the same number of columns shows the structure is intact.
Flag rows with empty required columns instead of deleting them