Data Cleaning formulas
Remove whitespace, fix casing, strip unwanted characters, and standardize messy data.
Convert text to numbers with VALUE
Flag duplicate values with COUNTIF
Remove extra spaces from text with TRIM
Remove non-printable characters with CLEAN
Suppress formula errors with IFERROR
Validate numeric entries with ISNUMBER
Frequently asked questions
How do I count blank cells in a range?
Use COUNTBLANK(A2:A100) to count all empty cells in the range. It counts both truly blank cells and cells containing an empty string.
Is there a faster way to convert a whole column?
Select the column, go to Data > Text to Columns > Finish — this converts the selection in place without a helper column. VALUE is better for formula-driven pipelines.
How do I mark only the second and subsequent occurrences, not the first?
Use =COUNTIF($A$2:A2,A2)>1 with a mixed reference — the range expands as you fill down, so it only flags rows after the first occurrence.
How do I clean an entire column at once?
Add a helper column with =TRIM(A2), copy it down, copy the results, and paste-as-values over the original column. Then delete the helper column.