Get Sheetsprint · ₹399

← Sheetsprint

4 min read

Clean your data before you write formulas: a routine for messy sheets

Spaces, text numbers, text dates and duplicates: fix them first and your formulas give the right answer.

Many spreadsheet problems are not formula problems at all. The formula is correct, but the data underneath is untidy, so the answer is wrong or the cell shows an error. Ten minutes of cleaning before you start saves an hour of confusion later. Here is a routine for any list you receive from software, a website or a colleague.

1. Make a copy first

Duplicate the sheet before changing anything. Cleaning involves deleting and replacing, and you want a way back.

2. Remove extra spaces

A code typed as "P105 " with a space at the end will never match "P105" in a lookup. In a helper column, use =TRIM(A2) to remove spaces at the start and end and turn double spaces into single ones. For text copied from web pages, add CLEAN to remove hidden characters. To find the problem cells, =LEN(A2) shows the number of characters; one too many means a hidden space.

3. Fix capitals

"RAMESH patil" and "Ramesh Patil" look like two people to some tools. =PROPER(A2) gives every word a capital first letter. Use UPPER for codes, and check brand names by hand afterwards.

4. Turn text numbers into numbers

Numbers that sit on the left of the cell, often with a small green triangle, are stored as text. SUM skips them silently, so your total is too small and nothing warns you. Select the column and use the warning icon's Convert to Number, or =VALUE(A2).

5. Turn text dates into real dates

Dates exported from billing software are often text. They sort in the wrong order and date maths fails. =DATEVALUE(A2) converts them; then format the column as a date. Watch the day and month order: 04/05 means 4 May in India and 5 April on a computer set to US format. Writing months as letters, such as 04-May-2026, avoids the confusion.

6. Split what is joined

An address in one cell, such as "Pune, Maharashtra, 411001", is hard to sort or count by city. Use Text to Columns in Excel or Split text to columns in Google Sheets. Format PIN code and phone columns as text first so leading zeros survive.

7. Remove duplicates carefully

Highlight duplicates with conditional formatting and look at them before deleting. Choose the columns that really define a duplicate, such as name and phone together, not name alone.

8. Paste back as values

When a helper column looks right, copy it and paste it over the original as values only, then delete the helper. Otherwise the clean column still depends on the messy one.

9. Stop the mess coming back

Add dropdowns to columns with fixed choices, such as branch or status, so everyone types the same word. Prevention is quicker than cleaning every month.

The Sheetsprint Formula Cards cover each of these steps with a worked example, and the Practice Workbook includes text dates on purpose, so you can practise the fix on safe data.

Keep reading