How to Prepare a Google Sheet: Clean, Format & Organize

How-to basics · Updated November 23, 2026

Preparing a Google Sheet means turning raw, messy data into a clean, readable, and functional spreadsheet. This guide covers the essential steps: removing duplicates, fixing data types, applying formatting, freezing headers, and adding filters. You’ll need a Google account and a browser; most steps work on the Google Sheets mobile app, but the web version is recommended.

What You’ll Need

  • A Google account (free)
  • A web browser (Chrome, Firefox, Safari, Edge)
  • The data you want to prepare, either already in a Google Sheet or in a file you can upload (CSV, XLSX, etc.)

Step-by-Step

  1. Open or create your sheet. Go to sheets.google.com and open the file you want to prepare, or click Blank to create a new one. If you have an existing file (e.g., CSV), go to File > Import and upload it.
  2. Select your data range. Click the top-left cell of your data, then press Ctrl+Shift+End (Windows) or Cmd+Shift+End (Mac) to select everything from that cell to the last used cell. Alternatively, click the rectangle at the intersection of the row numbers and column letters (top-left corner) to select the entire sheet.
  3. Remove duplicates. With your data selected, go to Data > Data cleanup > Remove duplicates. A dialog appears showing which columns to check. Keep all columns selected (unless you want to check only specific ones) and click Remove duplicates. Google Sheets will tell you how many rows were removed. If you want to keep a backup, copy the sheet first (right-click the tab > Duplicate).
  4. Check and fix data types. Look for numbers stored as text (usually left-aligned with a green triangle warning). Select the column, then go to Format > Number and choose the appropriate format (e.g., Number, Date, Currency). For dates, select the column and go to Format > Number > Date. If you have a column with mixed formats, use Data > Split text to columns if needed.
  5. Trim whitespace. Extra spaces cause sorting and lookup issues. Use the TRIM function in a new column: with your data in column A (A1:A100), type =TRIM(A1) in cell B1, then drag the fill handle down. Copy column B, right-click column A, choose Paste special > Paste values only, then delete column B.
  6. Format headers. Select the first row (your headers), then click B (bold) on the toolbar. Go to Format > Cell > Fill color and pick a light shade (e.g., light gray). This distinguishes headers from data.
  7. Freeze header row. Go to View > Freeze > 1 row (or choose 2 rows if you have a title row above headers). This keeps headers visible when scrolling.
  8. Add filters. Select your data range (including headers), then go to Data > Create a filter. Small dropdown arrows appear in each header cell. You can now sort and filter by clicking these arrows.
  9. Set column widths. Select all columns, then right-click a column letter and choose Resize columns > Fit to data. Or manually drag column borders to your preferred width.
  10. Add data validation (optional). To prevent invalid entries, select a column, go to Data > Data validation, choose criteria (e.g., List of items), and enter valid options separated by commas. Click Save.
  11. Protect important sheets (optional). If you’re sharing the sheet, go to Data > Protect sheets and ranges to lock certain cells or the entire sheet.

Common Mistakes

  • Not removing duplicates before analysis – duplicates can skew totals and averages.
  • Leaving leading/trailing spaces – these break VLOOKUP and other lookup functions.
  • Using merged cells – merged cells cause sorting and filtering issues. Avoid merging unless absolutely necessary.
  • Ignoring data types – dates as text won’t sort chronologically; numbers as text won’t sum correctly.
  • Forgetting to freeze headers – you lose context when scrolling long sheets.

Tips

  • Use Ctrl+Shift+L (Windows) or Cmd+Shift+L (Mac) to toggle filters on/off quickly.
  • Name your ranges (Data > Named ranges) to make formulas easier to read.
  • Use conditional formatting (Format > Conditional formatting) to highlight outliers or important values.
  • If you’re preparing a sheet for import into another tool, export as CSV (File > Download > Comma-separated values) after cleaning.
  • Keep a raw data tab and a cleaned tab. Never edit the raw data directly; copy it first.

Troubleshooting

  • Remove duplicates is grayed out. Make sure you have selected a valid data range. If you have a single cell selected, it may not work. Also, ensure the range includes no empty rows/columns.
  • Data validation not working. Check that the range you applied it to is correct. If you have a header row, make sure you didn’t include it in the validation range.
  • Filters not showing all rows. If you have blank rows in your data, filters may not include them. Select the entire data range including blanks, or remove blank rows.
  • TRIM function not removing spaces. Some non-breaking spaces (from web copy) are not removed by TRIM. Use =SUBSTITUTE(A1,CHAR(160),"") to remove them.
  • Numbers not summing correctly. Check if the cells are formatted as text. Select the column, go to Format > Number > Number, and then re-enter the values (or use a formula like =VALUE(A1) in a helper column).

Frequently Asked Questions

Q: How do I remove duplicates without losing the original data?
A: Duplicate the sheet first (right-click the tab > Duplicate), then run Remove duplicates on the copy. Or, instead of deleting, use a formula to flag duplicates: =COUNTIF($A$2:$A$100, A2) > 1 in a helper column.

Q: Can I prepare a Google Sheet on my phone?
A: Yes, the Google Sheets app allows basic formatting, filtering, and duplicate removal, but some features (like data validation) are limited. For complex preparation, use a computer.

Q: How do I convert a PDF or image table into a Google Sheet?
A: Google Sheets can’t directly import PDFs. Use Google Drive’s OCR: upload the PDF, right-click it, choose Open with > Google Sheets. The text will be extracted, but you’ll need to clean it up.

Q: Why do my dates show as numbers like 45000?
A: That’s the serial number format. Select the column, go to Format > Number > Date to display as a date.

Q: How do I make a header row repeat on every printed page?
A: Go to File > Print, then under Formatting, check Repeat row headers.

Q: Can I undo Remove duplicates?
A: Yes, you can press Ctrl+Z (Windows) or Cmd+Z (Mac) immediately after. If you’ve closed the sheet, you can use version history (File > Version history > See version history) to restore a previous version.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.