Text function
VALUE function in Google Sheets and Excel
VALUE converts text that looks like a number, date or time into a real number you can add up.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
VALUE(text)Arguments in [brackets] are optional. Google Sheets writes it VALUE(text).
Example
=VALUE(D2) reads: Read the amount in D2, which the export stored as text, and return it as a real number.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Customer | Phone | Order | Amount | City | Amount |
| 2 | Okafor, Mara | +44 20 7946 0321 | ORD-2026-0412 | $1,250.00 | London | $1,250.00 |
| 3 | Lind, Jonas | +46 40 123 456 | ORD-2026-0413 | $89.90 | Malmö | |
| 4 | Raman, Priya | +91 20 5550 1234 | ORD-2026-0419 | $2,040.00 | Pune | |
| 5 | Ruiz, Tomás | +34 954 000 111 | ORD-2026-0420 | $15.00 | Seville | |
| 6 | Demir, Elif | +90 232 555 0199 | ORD-2026-0425 | $310.50 | Izmir | |
| 7 | Mori, Kenji | +81 6 5550 7788 | ORD-2026-0431 | $799.00 | Osaka |
F2 shows $1,250.00, now a real number: it's right-aligned and SUM can add it.
How the spreadsheet calculates it
Turns D2 into a number, when it's a number stored as text.
- 1. VALUE: Turns
D2into a number, when it's a number stored as text.text=`D2`: the cell holding a number as text
More VALUE examples
=VALUE(D2)The amount in D2 as a real number.=SUMPRODUCT(VALUE(D2:D7))The total of a column of text amounts: $4,504.40.=IFERROR(VALUE(D2),0)The amount, or 0 when the text can't be read.=VALUE(SUBSTITUTE(B2," ",""))Digits with spaces removed, as a number.
Paste any of these into the formula explainer to see it step by step.
Tips
- Convert in a helper column, check the result, then paste it back as values if you want to replace the text.
- Strip unusual characters with SUBSTITUTE before VALUE.
- Don't convert codes that need leading zeros, like postcodes or product codes.
What VALUE is used for
Fixing exports from accounting systems, web pages and CSV files where amounts, quantities or IDs arrive as text, so totals, averages, sorting and lookups work again.
Arguments
| Argument | Required | What it is |
|---|---|---|
| text | Yes | The text or cell to convert, such as "$1,250.00" imported as text.Watch out: Text that isn't a number, date or time the app recognises, like "n/a", gives #VALUE!. |
Common mistakes
Converting codes with leading zeros that you never calculate with: they lose the zeros.
Wrapping it around something that's already a number: harmless, but a sign the real problem is elsewhere.
Converting text with characters VALUE can't read, like "1 250 EUR": remove them with SUBSTITUTE first.
In Google Sheets
Google Sheets has VALUE(text) and describes it as converting text in any date, time or number format that Sheets understands into a number, the same idea as in Excel.
Errors you may see with VALUE
- #VALUE!: The text isn't a number, date or time the app can read, such as "n/a" or an empty-looking cell holding a space.
- #N/A: Without VALUE, a lookup of a number against digits stored as text finds nothing. How to fix it.
Questions
Why does SUM return 0 on my numbers?
They're stored as text, so SUM skips them. On this sheet SUM(D2:D7) is 0, while converting first gives $4,504.40: SUMPRODUCT(VALUE(D2:D7)). Better still, convert the column once with VALUE in a helper column.
Do I always need VALUE?
No. Microsoft notes that Excel converts text to numbers automatically when you calculate with +, -, * or /. You need VALUE for functions that skip text, like SUM, AVERAGE and COUNT, and for lookups.
How do I tell if a number is stored as text?
Text numbers are usually left-aligned and may show a small green triangle in Excel. ISNUMBER(D2) returns FALSE for them.
Sources
Official documentation the facts on this page were checked against.