Data Cleaning

Import CSV Into Google Sheets Cleanly

Upload CSV without broken dates and split columns — import settings, SPLIT, and TRIM pass before VLOOKUP or pivots.

Import CSV Into Google Sheets Cleanly

CSV exports from shops, banks, and CRMs often arrive with merged name fields, US dates, or leading zeros stripped from SKUs. Fix structure at import time instead of debugging #N/A later.

Method 1 — File upload (quick)

  1. File → Import → Upload → select .csv
  2. Import location: Replace current sheet or Insert new sheet
  3. Separator type: Comma (or Semicolon if European export)
  4. Convert text to numbers, dates, and formulas: check ON for numeric columns
  5. Import

If SKUs like 00124 become 124, see "Preserve leading zeros" below.

Method 2 — IMPORTDATA for a public URL

=IMPORTDATA("https://example.com/export.csv")

Only works if the URL is publicly reachable without login. Refresh when the file updates.

Split "Last, First" into two columns

Column A contains Lee, Sam. Column B:

=TRIM(SPLIT(A2, ","))

In Google Sheets, SPLIT spills into B2 and C2. Excel: use Data → Text to Columns (Alt+A, E) with comma delimiter.

Parse dates that import as text

If B2 shows 03/01/2026 as left-aligned text:

=DATEVALUE(B2)

Format column as Date. US vs EU ambiguity: if day/month swap, fix locale at import or use =DATE(RIGHT(B2,4), MID(B2,4,2), LEFT(B2,2)) only when you know the source format.

Preserve leading zeros on SKU

Before import, open CSV in a text editor and confirm SKUs are quoted: "00124".

In Sheets after bad import:

  1. Select SKU column
  2. Format → Number → Plain text
  3. Re-import, or prepend apostrophe '00124 in source

Better: import to a Raw tab as text, then:

=TEXT(A2, "00000")

for fixed-width codes.

TRIM pass before lookup

New column:

=TRIM(CLEAN(D2))

Paste values, then VLOOKUP against cleaned SKUs. More on spaces: TRIM and PROPER.

Excel desktop import

Data → Get Data → From File → From Text/CSV

Use preview pane to set column types: set SKU to Text before load. Ctrl+Shift+L adds filters to verify row count after import.

Wrong vs Right

WrongRight
Pivot on import tab with blank row 1 header mis-detectedConfirm row 1 headers; delete blank top rows
Dates as serial numbers you format as textSet date format on true date cells
VLOOKUP immediately on raw columnTRIM/CLEAN helper column → values → lookup

Next

Feed cleaned rows into pivot table intro or inventory tracker.

csv import google-sheets trim split