FormulaCamp
Completed
6. Data Management and Cleaning · Lists and Messy Data · 20 min

8. Numbers Stored as Text and Dates from CSV

Lesson 8 of 10
Task 1 of 6
  1. In G2:G6, turn the text in column A into numbers (some have spaces at the edges).

Lesson theory

After an export from an accounting system, a bank or a CSV file, numbers and dates often arrive as text: they hug the left edge, SUM does not see them (it returns 0), and sorting goes "alphabetically". In Excel such cells have a green triangle and a "Convert to Number" option.

  • VALUE(TRIM(A2)) removes the spaces at the edges and turns the text into a number. A shorter way: =--A2;
  • SUBSTITUTE removes the extras: a $ sign, commas between thousands;
  • NUMBERVALUE(text, decimal, group) converts a number written with foreign separators: "1.250,75" from a European CSV, where the comma is the decimal separator;
  • a date such as "2026-03-15" or "15/03/2026" (day/month/year) is safest to build from its parts: DATE(year, month, day) with LEFT, MID and RIGHT.
To check: =ISNUMBER(A2) is FALSE for text and TRUE for a real number. In Excel you can also fix day/month/year dates with Data › Text to Columns, setting the column format to "Date: DMY".

Practice is part of Pro

The live spreadsheet, task checking and .xlsx files in all 170 lessons. Your progress is saved in this browser; sync across devices is coming soon.