TIPS FOR CLEANING DATA IN GOOGLE SHEETS
- 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.
Learn how to use forms
To create a survey in Forms, see Get started with Forms.
Send survey responses to a new spreadsheet:
In Forms, on the Responses tab, click "More" and then "Select response destination".
Select Create a new spreadsheet.
[Optional] To change the name, enter a new one.
Click Create.
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 Progress, and Not Started. You specify the options and they appear in a drop-down list in each cell in the column.
Learn 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.
Learn 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.
Learn 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:
The URL of the spreadsheet in Sheets. Copy and paste the URL from the spreadsheet that contains the data you want to import.
[optional] The sheet name and the range of cells to import.
Note: If you are in a Spanish-speaking country, use the semicolon as a separator instead of the comma.
Press Enter.
Click "Allow access" to connect the 2 spreadsheets.
5. Find and update data
Searching for data and updating it doesn’t have to be time-consuming. You can quickly find and update text or numbers in Sheets.
Learn 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.
To replace all instances, click "Replace all".
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.
Learn 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.
Learn 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).
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.
Learn 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.
Learn 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.
Learn 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.