Introduction
In our last lesson, you acted as a data detective, systematically assessing a messy dataset and creating a "cleaning plan" to address the issues you found. That initial investigation is a vital professional habit. Now, it's time to roll up your sleeves and execute that plan.
This lesson is entirely hands-on. We'll take the problems we identified—duplicates, inconsistencies, errors, and poor formatting—and fix them one by one using the powerful cleaning tools and functions within Google Sheets. By the end of this session, you will have transformed a raw, unreliable dataset into a clean, structured, and trustworthy resource, mastering the core skills you'll use in freelance data research projects.
The Project: Cleaning Concession Stand Data
To make this practical, we will work on a beginner-friendly data cleaning project. This project uses a real-world scenario: cleaning sales data for a fictitious company, "KAT Concession Supply."
First, let's get acquainted with the project and set up your workspace.
Beginner Data Cleaning and Analytics Project Using Google Sheets
This document from Accounting is Analytics outlines the project. It describes the fictitious company and the goal: to clean a dataset before it can be used for analysis.
First, read the introduction to understand the context: the project overview. Next, you'll need to get your own copy of the data. Follow the instructions in the "Data set" section. Click the link to the data and be sure to make a copy of the spreadsheet so you can edit it.
Executing the Cleaning Tasks
Now that you have your own copy of the KAT Concession Supply data, we can begin cleaning. We will follow the requirements listed in the project document you just read, which mirror the "cleaning plan" you learned to create.
1. Adjusting Column Widths
First, a simple but important step for readability. The data is hard to read when it's cramped in the cells. Let's fix that.
- Select all cells by clicking the empty rectangle in the top-left corner (to the left of column A and above row 1), or by pressing
Ctrl+A(Cmd+Aon Mac). - Hover your mouse over the line between any two column headers (e.g., between A and B) until the cursor changes to a double-sided arrow.
- Double-click. This will automatically resize each column to fit its content.
This quick trick is a great first step in making any dataset more manageable.
2. Removing Duplicate Records
Duplicate rows are one of the most common and serious data quality issues, as they can lead to inflated counts and incorrect analysis. Let's find and remove them.

- With all your data still selected (
Ctrl+A), navigate to the menu shown in the image above:Data>Data cleanup>Remove duplicates. - A dialog box will appear. Check the box for
Data has header row. - Ensure all columns are selected. This tells Sheets to look for rows that are identical across every column.
- Click
Remove duplicates. Google Sheets will tell you how many duplicate rows it found and removed.
This single action significantly improves the integrity of your data. For a more detailed guide on this process, you can refer to the ModelMonkey article.
How to Clean Messy Data in Google Sheets - ModelMonkey
This article provides clear, step-by-step instructions for various data cleaning tasks in Google Sheets.
Read the section titled Remove Duplicates. It provides a concise summary of the steps you just performed and offers a useful pro tip about creating backups.
3. Cleaning and Standardizing Text
Much of data cleaning involves fixing text. This includes removing extra spaces, correcting capitalization, and replacing incorrect values. We will use a combination of functions and tools to do this.
A. Removing Extra Spaces and Changing Case
In your dataset, the project requires you to clean the Transaction year (original) column and change the Warehouse state (original) to uppercase. We'll use a standard professional workflow involving "helper columns" and three key functions:
TRIM(): Removes leading and trailing spaces from text.CLEAN(): Removes non-printable characters (like line breaks) that can be hidden in data imported from other systems.UPPER(): Converts all text to uppercase. (LOWER()andPROPER()are also available for lowercase and title case, respectively).
Let's watch a video that demonstrates this workflow. While the video uses Excel, the functions and the "copy/paste values" technique are identical in Google Sheets.
Master Data Cleaning Essentials on Excel in Just 10 Minutes
This video by Kenji Explains demonstrates how to use the TRIM and PROPER functions in a helper column and then paste the results as values.
Watch the section from this demonstration. Pay close attention to how he combines TRIM and PROPER into a single formula, and the crucial step where he uses "paste as value" (alt + H + VV in Excel, Ctrl+Shift+V in Sheets) to finalize the cleaning.
Now, apply this to your project sheet for the Warehouse state column:
- Insert a new column to the right of
Warehouse state (original). You can call itTemp. - In the first cell of your new column (e.g.,
L2), enter the formula:=UPPER(TRIM(K2)). This will take the value from cellK2, remove any extra spaces, and convert it to uppercase. - Click on the cell with the formula. A small blue square will appear in the bottom-right corner. Double-click this square to automatically fill the formula down for all rows.
- Select the entire
Tempcolumn, and copy it (Ctrl+C). - Select the first cell of the
Warehouse state (edited)column (cellM2). - Paste the data as values only by using the shortcut
Ctrl+Shift+V(or by right-clicking and selectingPaste special>Values only). - You can now delete the
Tempcolumn.
Repeat a similar process for the Transaction year (original) column, using the formula =TRIM(CLEAN(C2)) in a helper column and pasting the values into Transaction year (edited).
B. Find and Replace
The project requires you to replace all instances of “coffee” with “cola.” The fastest way to do this is with the Find and Replace tool.
- Select the columns you want to search (in this case, Columns G and H).
- Go to
Edit>Find and replace(or use the shortcutCtrl+H). - In the "Find" box, type
coffee. - In the "Replace with" box, type
cola. - Click
Replace all. Sheets will confirm how many instances were replaced.
This tool is incredibly efficient for correcting widespread, consistent errors.
4. Splitting Text to Columns
The project dataset doesn't require this, but it's a critical skill included in our learning outcome. Often, you'll receive data where multiple pieces of information are in a single column, like "John Smith" in a Full Name column. Google Sheets can easily split this.
Let's watch a quick demonstration of the "Text to Columns" feature.
Master Data Cleaning Essentials on Excel in Just 10 Minutes
This clip from the Kenji Explains video shows how to split one column into two based on a delimiter (in this case, an underscore).
Watch the segment from Text to Columns. Notice how he first selects the data, then navigates to Data > Text to columns and specifies the character to split by.
To try this yourself (hypothetically):
- Select a column containing data you want to split (e.g., a column of full names).
- Go to
Data>Split text to columns. - A small box will appear, allowing you to choose the delimiter (e.g., comma, space, or a custom character).
- Sheets will automatically split the text into the adjacent columns to the right. Be careful, as this will overwrite any data in those columns!
5. Handling Missing Values and Errors
Blank cells and error messages can disrupt analysis. The project requires you to format some columns as currency, but first, you must handle any non-numeric data in those cells.
A common strategy is to replace blanks or errors with a specific value like "N/A", "Unknown", or 0.
Master Data Cleaning Essentials on Excel in Just 10 Minutes
This video provides two excellent techniques: one for filling blank cells in bulk, and another for handling formula errors.
First, watch how to fill blank cells. The key technique is selecting the blanks and using Ctrl+Enter to fill them all at once. Next, watch how the IFERROR function is used to replace formula errors with a clean "N/A" value. This is extremely useful when your calculations might result in errors like #DIV/0!.
For your project, once you have cleaned any errors in columns AE through AI, you can apply the currency formatting as required:
- Select the columns (e.g., AE through AH).
- Go to
Format>Number>Currency. - To change the number of decimal places, use the "Decrease decimal places" or "Increase decimal places" icons in the toolbar.
Conclusion
Congratulations on working through your first full data cleaning project! You have taken a raw, messy file and systematically transformed it into a clean, reliable dataset. This process is the bedrock of all credible data analysis and a highly valuable skill for any data researcher.
Your key takeaways from this lesson are the practical techniques you applied:
- Remove Duplicates: Use the built-in tool to ensure data integrity.
- Standardize Text: Master the helper column workflow with functions like
TRIM,CLEAN,UPPER,LOWER, andPROPER, followed by "Paste values only." - Correct in Bulk: Use
Find and Replacefor fast, consistent corrections. - Restructure Data: Split a single column into multiple columns using
Split text to columns. - Handle Blanks and Errors: Fill empty cells and use functions like
IFERRORto manage missing or invalid data.
In our next lesson, we will focus on the final step of this project: restructuring the cleaned data into a well-organized final output. This involves arranging columns, ensuring the format is logical, and preparing the dataset for delivery or analysis.