Sub topic 14
Check the Cleaned Data Before You Trust It
Assume you know how to select ranges, use the Google Sheets menu bar, and enter simple formulas. This chapter focuses on verification: checking that a cleanup changed the problems you intended to fix without removing useful information.
Cleaning is not complete when a formula returns a result. A cleaned table should also have the expected number of rows, consistent values, valid columns, and no accidental blanks. Verification catches errors before they affect a lookup, chart, pivot table, or report.
Use a checklist, not a quick glance
Check the cleaned data in this order:
- Compare the row count with the original data.
- Check for unexpected blank cells.
- Look for remaining duplicates.
- Confirm that split values went into the correct columns.
- Check values against the original rows.
- Test the cleaned data in the task that required it.
A row count that suddenly drops can indicate that duplicate removal deleted legitimate records. A row count that increases can indicate that a formula expanded into unintended rows.
You can count nonblank values with COUNTA. For example, if customer IDs are in column A:
=COUNTA(A2:A)Compare this result with the original copy. If you removed duplicates intentionally, document the difference rather than treating it as a surprise.
Check blanks and duplicates
A cleanup formula can create blanks when source cells are empty or when a split delimiter does not appear. Use a filter on the cleaned range and select (Blanks) to inspect them.
You can also count blank cells in a required column:
=COUNTBLANK(A2:A)For a duplicate check, use a helper column beside the cleaned data:
=COUNTIF($A$2:A2, A2) > 1Fill the formula down. TRUE identifies later occurrences of a value. Review these rows before deleting them. Two rows with the same name may represent different orders, dates, or customer records, so a duplicate name is not always a duplicate row.
If the row contains several fields, check a combination of fields instead. For example, combine an email and order ID in a helper column:
=A2&"|"&B2Then apply COUNTIF to that helper column. The separator reduces the chance that two different combinations produce the same combined text.
Verify split and character cleanup
After splitting a value such as Doe, Jane, inspect both new columns. Check that:
- The first and last names are in the intended order.
- No values were shifted because a row contained an extra comma.
- Empty second values are expected.
- Commas inside addresses or company names were not split incorrectly.
For phone numbers, verify that removing punctuation did not remove meaningful extensions or country codes. A formula such as this removes every nondigit character:
=REGEXREPLACE(A2, "[^0-9]", "")That result may be useful for matching, but it may not be suitable for display. Keep the original phone number when people need to read it.
Compare with the raw data
Keep the raw sheet beside the cleaned sheet. Pick several rows from the beginning, middle, and end of the data. Compare important fields, not just the visible names.
Pay special attention to:
- IDs that contain leading zeros.
- Dates that changed format or meaning.
- Names changed by
PROPER, such asMcDonaldorvan Gogh. - Values removed by
CLEANorREGEXREPLACE. - Rows removed by deduplication.
A cleanup is trustworthy when each change has an explanation. Record the formulas or menu actions used, the number of source rows, the number of cleaned rows, and any rows you excluded.
Exercise
Exercise
Your cleaned table has 1,000 source rows, 940 output rows, and 12 rows where the customer name is blank. What should you check before approving it?
Show answer
Check whether duplicate removal intentionally removed 60 rows, whether blank names existed in the source, and whether the cleanup formula created new blanks. Then inspect representative rows against the raw data and test the cleaned table in the intended lookup or report.