← All how-to recipes

How to convert text that looks like a number into a real number

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Turn numbers stored as text (left-aligned, won't sum) into actual numeric values.

The formula

AppFormulaNotes
Excel=VALUE(A2)Or a quick trick: =A2*1 or =A2+0.
Google Sheets=VALUE(A2)Identical.
LibreOffice Calc=VALUE(A2)Identical.

How it works

VALUE() parses a text string into a number so it can be summed and compared. =A2*1 does the same by forcing arithmetic. The reverse (number to text) is TEXT().

Verified, not just documented

We ran =VALUE(A2) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 123 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 123 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run Excel.

Functions used

VALUE — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons