Sub topic 1
What Messy Data Looks Like and Why It Breaks Your Sheet
Prerequisites
You should know how to navigate a Google Sheets spreadsheet, select rows and columns, work with ranges, and enter simple formulas such as =A1&B1. You should also know how to use the menu bar.
Messy data is data that looks usable but does not follow one consistent structure. It often comes from exports, form responses, copied web pages, or hand typing. A sheet can contain extra spaces, invisible characters, different capitalization, duplicate rows, or several values packed into one cell.
These problems matter because Google Sheets compares cell contents exactly in many operations. A lookup, filter, count, or pivot table can treat values that look identical as different values.
| What you see | What the sheet may store | Possible result |
|---|---|---|
| `Jane Doe` and ` Jane Doe ` | Different text values | A lookup misses a matching name |
| `NY`, `ny`, and `New York` | Three different values | A count splits one category into three |
| One row repeated twice | Two records | Totals and averages become too large |
| `Doe, Jane` in one cell | One text value | First and last names cannot be sorted separately |
Spaces are a common source of trouble. A leading space appears before the first character, and a trailing space appears after the last character. Extra spaces can also appear between words. The cells may look the same at normal zoom, but a comparison such as =A2=B2 can return FALSE.
Capitalization creates a similar problem. Google Sheets often treats Paid, paid, and PAID as different text values when grouping or comparing data. The same issue occurs with names, locations, product codes, and status labels.
Some characters do not appear on screen at all. A non-breaking space is a special space that prevents a line break. It can arrive when you copy text from a web page. Non-printing characters can also come from imported files. The TRIM function does not remove every kind of invisible character, so a value can still fail to match after ordinary trimming.
Duplicates are another form of messiness. A duplicate row may represent an accidental second copy, or it may be a legitimate repeated event. For example, two orders from the same customer are not necessarily duplicates. You need to decide which columns identify one record before removing anything.
Combined values cause structural problems. A cell containing Doe, Jane has two pieces of information, but Sheets sees one value. This makes it harder to sort by last name, personalize messages, or analyze each field separately.
A useful cleanup process moves from visible problems to hidden ones, then checks the result.
The next steps use menu tools for quick one-time fixes and formulas for repeatable cleanup. Before changing values, inspect a few suspicious cells and identify what each row represents.
Exercise
A customer name appears as Jane Doe in one row and Jane Doe in another. The names look identical, but a lookup does not match both rows. What type of messiness should you investigate first?
Show answer
Investigate leading whitespace first. Compare the cells carefully and use a trimming method on a copy of the data before checking the lookup again.