New Tool Radar

AI for Data & Spreadsheets

How to Fix Decimal Commas in a CSV Import in Excel

Fix a CSV that uses commas as decimal separators by importing it with the right locale so values stay numbers.

Schematic illustration for How to Fix Decimal Commas in a CSV Import in Excel: three numbered steps - Import with Text/CSV; Set the locale; Check values are numbers.

A CSV from a European system may write 12,50 for twelve and a half, and an English-locale import will read it as two values or as text. Importing with the right locale tells Excel that the comma is a decimal separator, so the values land as numbers that add up.

Prerequisites

  • Excel
  • The CSV file and knowledge of the source locale
  • 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, open the locale setting and pick the locale that matches the source, such as German (Germany) for comma decimals.
  3. Check that the amount column shows numbers with decimal points and right-aligns.
  4. Load the data, then add a SUM below the amount column and compare it with a hand total.
  5. If any value still shows as text, fix it in the source file and re-import rather than editing the number.

Worked example: Fictional European price list imported

The practice table below is a fictional five-item price list after a locale-aware import. Each amount is a price, and the total is their sum. 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.

Item Amount
Pencil 0.85
Sharpener 1.10
Glue stick 2.40
Scissors 3.75
Highlighter 1.95
Total 10.05

Expected result. Five prices imported as numbers, and the amounts add to 10.05.

Limits

  • Using the wrong locale will swap the decimal and thousands separators, so confirm the locale from the source.
  • A file that mixes comma decimals and comma delimiters needs a different delimiter, such as a semicolon, to import cleanly.

Sources

See all