TIPS FOR CLEANING DATA IN GOOGLE SHEETS
Introduction to Cleaning Data in Google Sheets
Clean, well-structured data is essential for accurate analysis and decision-making. Flookup Data Wrangler makes it easier to standardize, validate and automate your data cleaning workflows in Google Sheets.
This article covers essential data cleaning tasks such as validation, deduplication, standardization and automation, helping you get the most out of Google Sheets and Flookup Data Wrangler. While it does not cover every aspect of this robust platform, it provides valuable insights that will enable you to carry out a majority of your data cleaning tasks effectively.
1. Use Forms for automatic data entry
Instead of manually entering survey responses in a spreadsheet, use Forms. Create your survey in Forms and send responses instantly to a spreadsheet in Sheets. The spreadsheet is linked to your survey, so new responses appear in real time.
How to use forms
- To create a survey in Forms, see How to use Google Forms.
- Send survey responses to a new spreadsheet: In Forms, on the Responses tab, click "More" and then "Select response destination".
- Send survey responses to an existing spreadsheet: In Forms, on the Responses tab, click "More" and then "Select response destination". Navigate to Select existing spreadsheet > Select. Choose your spreadsheet and click "Select".
2. Restrict data entry with lists
Reduce the chance of data-entry errors by limiting choices in Sheets. For example, if you have a status column, you can give choices, such as Done, In Progressand Not Started. You specify the options and they appear in a drop-down list in each cell in the column.
How to restrict data
- In Sheets, open a spreadsheet.
- Select the column where you want to add the options.
- Click Data > Data validation.
- Next to "Criteria", select "List of items".
- Enter the valid options separated by commas.
- Make sure the "Show dropdown list in cell box" is checked.
- Select "Show warning" or "Reject input" to specify what happens if someone enters an invalid option.
- [Optional] To show a message to assist with validation, check the "Show validation help" text box and enter a message. For example: Please enter a valid value [Done, In Progress, Not Started].
- Click "Save".
- [Optional] To see the choices, click the arrow in a cell under the column.
3. Validate email addresses
If your data involves entering email addresses, reduce entry errors by validating the email format in Sheets.
How to validate
- In Sheets, open a spreadsheet.
- Select the column that will contain the email addresses.
- Click Data > Data validation.
- Next to Criteria, select Text > contains.
- In the text box next to contains, enter "@".
- Select "Show warning" or "Reject input" to specify what happens if someone enters an invalid option.
- [Optional] To show a message to assist with validation, select "Show validation help text" and enter a message. For example: Please enter a valid email address, such as "user@example.com".
- Click "Save".
4. Combine data from several sheets into a single sheet
If you have data in separate spreadsheets, you can copy a range of data from one spreadsheet to another. For example, you can track quarterly sales data for a product in a different spreadsheet for each region. To combine all the quarterly sales data, copy the data from each region's spreadsheet into a single spreadsheet in Sheets.
How to combine data
- In Sheets, open a spreadsheet.
- In an empty cell, enter
=IMPORTRANGE
. - In parenthesis, add the following specifications in quotation marks and separated by a comma.
- Press Enter.
- Click "Allow access" to connect the 2 spreadsheets.
5. Find and update data
Searching for data and updating it does not have to be time-consuming. You can quickly find and update text or numbers in Sheets.
How to find and update
- In Sheets, open a spreadsheet and click Edit > Find and replace.
- Next to "Find", enter the text or numbers that you want to find.
- Next to "Replace with", enter the new data.
- Next to "Search", choose the sheets that you want to search.
- [Optional] To refine your search, select additional options. You can make your search case-sensitive, find exact matches, use regular expressions or search within formulas.
- Choose an option to replace the data: To replace instances one at a time, click "Find > Replace" and to replace all instances, click "Replace all".
With these search and update tools, you can keep your data accurate and up-to-date with minimal effort.
6. Split data into columns
You can split clearly defined data, such as text separated by commas, into separate columns in Sheets. For example, a single column with "Last name, First name" data can be split into 2 columns: Last name and First name.
How to split data
-
Paste and split data:
- In Sheets, open a spreadsheet and paste the data that you want to split into columns.
- Next to the cell where you pasted the data, click Paste formatting > Split text to columns.
- If you want Sheets to detect when a file is formatted using fixed-width, select "Detect automatically".
-
Split existing data:
- In Sheets, select the column that contains the data that you want to split.
- Click Data > Split text to columns.
- If you want Sheets to detect when a file is formatted using fixed-width, select "Detect automatically".
7. Swap rows and columns
If you want to rotate what you have in columns to rows or vice versa, you can do that using the TRANSPOSE
function in Sheets. For example, you might want to swap column headings
with row headings.
How to swap rows and columns
- In Sheets, open a spreadsheet.
- In an empty cell, type
=TRANSPOSE
. - In parentheses, enter the references to the rows or columns that you want to transpose.
- Press "Enter".
- For example: To transpose rows 1 and 2 of columns A through E, type:
=TRANSPOSE(A1:E2)
inside the appropriate cell.
8. Remove duplicate data
Duplication errors are a common problem that can be costly and easy to miss, especially in big data. Use Sheets to remove any unwanted, duplicate data. Cells with identical values but different letter cases, formatting or formulas are considered duplicates.
How to remove duplicates
- In Sheets, open a spreadsheet.
- Select the data range that you want to remove duplicate data in.
- Click Data > Remove duplicates.
- Select which columns to include and whether the data has headers.
- Click "Remove duplicates".
- In the status window, click "OK".
9. Remove extra spaces
When you copy and paste data, sometimes extra spaces are accidentally pasted. Extra spaces can cause problems when searching for data strings. Remove extra leading spaces, trailing spaces, or excessive spaces from your data in Sheets.
How to remove spaces
- In Sheets, open a spreadsheet.
- Select the data range that you want to remove extra spaces in.
- Click Data > Trim whitespace.
- Nonbreaking spaces are not trimmed.
10. Clean up data faster with keyboard shortcuts
Instead of using your mouse, work faster with keyboard shortcuts. For example, you can quickly select, group or hide rows or columns or format data in cells.
How to use keyboard shortcuts
To see a complete list of keyboard shortcuts, open Google Sheets and press ctrl + /
if you are using Windows or Chrome OS or ⌘ + /
if you are using macOS.
By mastering these shortcuts, you will save time and streamline your data cleaning process.
For those who prefer visual learning, here's a helpful video from Google that demonstrates many of these techniques in action.