New Tool Radar

AI for Data & Spreadsheets

How to Clean Extra Commas in Quoted CSV Fields in Excel

Fix a CSV whose quoted fields hold extra commas by importing it properly instead of double-clicking the file.

Schematic illustration for How to Clean Extra Commas in Quoted CSV Fields in Excel: three numbered steps - Do not double-click the CSV; Import with Text/CSV; Check column counts.

A CSV field such as "Smith, John" holds a comma inside quotes, and opening the file by double-clicking can split it into two columns. Importing through the Text Import wizard respects the quotes, so the field lands in one cell and the columns line up.

Prerequisites

  • Excel
  • The CSV file with quoted fields
  • A copy of the source file, so the original stays untouched.

Steps

  1. Do not double-click the CSV. In Excel, go to Data, Get Data, From File, From Text/CSV.
  2. In the preview, check that the quoted fields sit in one column each and the column count is right.
  3. Set the delimiter to Comma and the text qualifier to double quote, then load the data.
  4. Check the row count against the source and confirm no row is split across two lines.
  5. Save the imported file as .xlsx and keep the original CSV.

Worked example: Fictional customer list with quoted names

The practice table below is a fictional five-customer list after a correct import. The count column is 1 per customer, and the total is the number of customers. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.

Name Town Count
Smith, John York 1
Okafor, Amara Leeds 1
Jensen, Clara Bath 1
Patel, Dev Bristol 1
Rossi, Elena Oxford 1
Total 5

Expected result. Five customers, each name in one cell, and the count is 5.

Limits

  • A field with an unclosed quote will still split wrongly, so check the row count after import.
  • A CSV that uses a different text qualifier needs the qualifier set by hand in the preview.

Sources

See all