The VALUE function in Google Sheets converts a text string into a number, enabling calculations that would otherwise fail if the value is stored as text. It’s essential when importing data from external sources or cleaning datasets where numbers are accidentally formatted as text. No special setup is required—just a Google Sheets spreadsheet with the necessary data.
What You'll Need
- A Google Sheets spreadsheet open and accessible
- Data cells containing numbers stored as text (e.g., "123" instead of 123)
- Basic familiarity with entering formulas in Google Sheets
Step-by-Step
- Open your Google Sheet and locate the cell containing the text-formatted number you want to convert (e.g., cell A2 shows "45.99" but appears left-aligned and has a small green triangle in the corner).
- Click on the destination cell where you want the converted number to appear (e.g., B2).
- Type the formula
=VALUE(A2)directly into the formula bar or the cell itself. Replace A2 with the actual cell reference containing your text number. Ensure the reference is correct and enclosed in parentheses after VALUE. - Press ⏎ Enter. The cell should now display the numeric value (e.g., 45.99), right-aligned, and the green triangle will disappear if present.
- To apply this to multiple rows, drag the fill handle (small square at the bottom-right of the cell) down the column. Google Sheets will automatically adjust the reference (e.g., =VALUE(A3), =VALUE(A4), etc.).
- For bulk conversion without helper columns, copy your source column (e.g., A2:A100), right-click the same range, choose Paste special > Paste values only, then use Data > Split text to columns (with delimiter set to "None") to force re-evaluation, or use ArrayFormula:
=ARRAYFORMULA(IF(A2:A="",", VALUE(A2:A)))in a new column.
Common Mistakes
- Using VALUE on non-numeric text: VALUE only works with strings that represent valid numbers, dates, or times (e.g., "123", "01/05/2024", "10:30"). If applied to "abc" or "N/A", it returns a #VALUE! error.
- Ignoring locale settings: In regions using commas as decimal separators (e.g., "12,50"), VALUE expects the local format. If your sheet locale uses periods (e.g., "12.50"), entering VALUE("12,50") may fail unless you adjust locale via File > Settings > General > Locale.
- Overlooking hidden characters: Leading/trailing spaces or non-breaking spaces (often from web imports) cause errors. Use TRIM(VALUE(A2)) or wrap in TRIM() first:
=VALUE(TRIM(A2)). - Assuming VALUE fixes all formatting: VALUE converts text to numbers but does not fix date/time storage issues. For dates stored as text like "2024-05-01", use DATEVALUE or TIMEVALUE separately before VALUE if needed.
- Forgetting to update formulas: If source text changes after conversion, VALUE won’t auto-recalculate unless the cell reference updates—ensure your formula references are dynamic.
Tips
- Combine with other functions: Use
=VALUE(SUBSTITUTE(A2,"$",""))to strip currency symbols before converting, or=VALUE(SUBSTITUTE(A2,",",""))to remove thousands separators. - Use ISNUMBER to verify: Wrap VALUE in ISNUMBER to test success:
=ISNUMBER(VALUE(A2))returns TRUE/FALSE, helping flag problematic entries. - Apply via Find & Replace: For quick fixes, select the column > Ctrl+H (Cmd+H on Mac) > search for "" (empty) in "Search using regular expressions" mode and replace with nothing—but only if text numbers lack other characters. Better: use =VALUE() in a helper column first.
- Preserve original data: Always keep raw data intact. Convert to numbers in a new column, then copy-paste values back over the original once verified.
- Check cell alignment: After conversion, ensure numbers are right-aligned (standard for numeric data). Left-aligned numbers often indicate text storage.
Troubleshooting
- #VALUE! error: This means the input isn’t a valid number string. Check for non-numeric characters, spaces, or incorrect locale formatting. Try
=ISNUMBER(A2)first—if FALSE, inspect A2 closely. Use CLEAN(A2) to remove non-printable characters:=VALUE(CLEAN(A2)). - Formula returns 0: VALUE returns 0 for empty strings. Confirm A2 isn’t blank. If it contains spaces, use TRIM:
=VALUE(TRIM(A2)). - Conversion works but numbers don’t calculate: Ensure surrounding cells aren’t formatted as text. Select the column > Format > Number > Number (or Decimal) to enforce numeric formatting.
- ArrayFormula fails: Check syntax:
=ARRAYFORMULA(VALUE(A2:A))requires A2:A to contain only valid number strings. Add error handling:=ARRAYFORMULA(IF(A2:A="",", IFERROR(VALUE(A2:A),"Invalid"))). - Still stuck: Copy the cell content into a new sheet to isolate issues. Test with a simple value like =VALUE("100") in a blank cell—if it works, the problem is with your original data or locale settings.
Frequently Asked Questions
Does VALUE work with dates stored as text?
Yes, but only if the text matches your sheet’s locale date format (e.g., "5/1/2024" in US locale). For better reliability, use DATEVALUE first:=VALUE(DATEVALUE(A2)) or directly format as date via Format > Number > Date.