Google Sheets Convert Text to Number: A Practical Guide
Learn practical, step-by-step methods to convert text to numbers in Google Sheets. Use VALUE, NUMBERVALUE, and cleanup tricks to ensure accurate calculations and clean data.
You're going to learn how to convert text to numbers in Google Sheets, so your calculations and analyses stay accurate. This guide covers simple formulas, locale-aware options, and practical cleanup techniques for mixed data. By applying VALUE, NUMBERVALUE, and the double-unary tricks, you can reliably transform strings like '123', '$45.00', or '1,234' into numeric values you can sort, sum, and chart with confidence.
Why text values create problems in Google Sheets
When values in a column are stored as text, formulas like SUM and AVERAGE can misbehave, and sorts become unreliable. This is a common issue after importing data from other systems, copying from PDFs, or typing numbers with leading zeros. In practice, google sheets convert text to number challenges arise when a column contains values that look numeric but are stored as text. You may notice #VALUE! errors in calculations, numbers that sort alphabetically (e.g., 2 before 10), or mixed data types across rows. The result is inconsistent analytics and extra cleanup time. The good news is that there are reliable conversion approaches, and you can choose the method that matches your data pattern and locale. By understanding these patterns, you can standardize numeric data across your sheets and improve accuracy.
Quick overview of conversion methods
Google Sheets offers multiple paths to convert text to numbers. The most common are: VALUE for basic conversion, NUMBERVALUE for locale-aware parsing, and the double unary technique (--A1) for fast coercion. When data contains non-numeric characters (currency signs, words, or separators), you can clean the text first using REGEXREPLACE, then apply a conversion. For large datasets, combining ARRAYFORMULA with these methods lets you convert entire columns in one pass. The choice depends on data cleanliness, locale, and whether you need to preserve the original text.
Method 1: VALUE function for straightforward conversions
VALUE(text) converts text that looks like a number into an actual numeric value. It is simple to use: =VALUE(A2) will turn a cell containing '123' into 123. If the cell contains non-numeric characters (like '$' or ',') you’ll get an error, so consider cleaning first or wrapping the call in IFERROR. Practically, VALUE works best when data is consistently numeric-looking text and locale separators don’t complicate parsing.
Method 2: Double unary (--A1) to coerce numbers
The double unary minus, written as --A2 or as a leading minus, coerces text to numbers quickly. Example: =--A2 or =A2*1. This approach is fast and works well for clean numeric-like text. For ranges, you can use ARRAYFORMULA(--A2:A). If a value cannot be coerced, Google Sheets returns an error, so combine with IFERROR when needed.
Method 3: NUMBERVALUE for locale-aware numbers
NUMBERVALUE(text, [decimal_separator], [thousand_separator]) lets you specify how decimals and thousands separators are recognized. This is essential for international data, where a comma is a decimal or a period is a thousands separator. Example: =NUMBERVALUE(A2, ",", ".") converts a string like '1.234,56' into 1234.56 when your locale uses comma as the decimal separator. If you omit separators, Google Sheets will assume default settings.
Method 4: Cleaning data with REGEXREPLACE before conversion
REGEXREPLACE helps strip non-numeric characters before converting. Use a pattern to remove symbols like currency signs or letters, then apply VALUE or NUMBERVALUE. Example: =VALUE(REGEXREPLACE(A2, "[^0-9.-]", "")) cleans 'USD 1,234.56' to 1234.56. Be cautious with negative signs and decimals to avoid creating invalid results.
Handling common pitfalls: leading zeros, currency symbols, and mixed data
Leading zeros matter in identifiers but not in numeric calculations. Converting text to number will strip leading zeros, which is fine for totals but may break IDs. Currency symbols and punctuation require cleaning, often with REGEXREPLACE or SUBSTITUTE. Mixed data (some text, some numbers) benefits from an IF function to guard conversions (e.g., IF(ISNUMBER(A2), A2, VALUE(REGEXREPLACE(A2, "[^0-9.-]", "")))). Always validate a sample before applying to an entire column.
Practical workflow: applying the methods to a range with ArrayFormula
For large datasets, avoid manual dragging. Use ARRAYFORMULA to apply conversion across a column: =ARRAYFORMULA(VALUE(A2:A)). For locale-aware data: =ARRAYFORMULA(NUMBERVALUE(A2:A, ",", ".")). When cleaning first: =ARRAYFORMULA(VALUE(REGEXREPLACE(A2:A, "[^0-9.-]", ""))). Ensure there is a header row and handle blank cells to prevent errors.
Validation and testing: quick checks to confirm accuracy
After applying a conversion, verify several sample cells: do they equal the expected numeric value? Check edge cases like negative numbers, decimals, and numbers with currency symbols. Use simple arithmetic in a test range to confirm results, e.g., SUM, AVERAGE, or COUNT. If any discrepancy occurs, inspect the original text, separators, and whether the correct conversion method was used for that data type.
Tools & Materials
- Google Sheets access(Open a new or existing spreadsheet to practice conversions.)
- Sample data with text-number values(Include plain numbers, currency strings, locale-specific decimals, and mixed data.)
- Backup copy of the sheet(Always preserve a version before applying bulk changes.)
- Reference for locale settings(Optional: a sheet with decimal and thousands separators to guide NUMBERVALUE usage.)
- Keyboard shortcuts cheat sheet(Helpful for speed when testing formulas.)
Steps
Estimated time: 20-40 minutes
- 1
Open your data and identify candidates
Open the Google Sheet containing text values that should be numeric. Locate the column or range where values look numeric but are stored as text. This is your target for conversion.
Tip: Create a separate test column to compare results with the original data. - 2
Choose an initial conversion method
Decide whether to start with VALUE for simple cases, the double unary for speed, or NUMBERVALUE for locale-specific data. Consider CLEANING first if non-numeric characters are present.
Tip: Start with a small sample to see how each method behaves with your data. - 3
Apply VALUE for straightforward text
In a helper column, enter =VALUE(A2) and copy down. If you see an error, the text likely contains non-numeric characters that must be removed or sanitized.
Tip: Wrap VALUE with IFERROR to prevent #VALUE! from propagating. - 4
Coerce with double unary for speed
In a helper column, try =--A2 or =A2*1. This quickly turns numeric-looking text into numbers. For ranges, use ARRAYFORMULA(--A2:A).
Tip: Use IFERROR to handle any unexpected text gracefully. - 5
Use NUMBERVALUE for locale-aware data
If your data uses different decimal separators, apply =NUMBERVALUE(A2, ".", ","). Adjust parameters to match your locale.
Tip: Test with sample values like '1,234.56' and '1.234,56'. - 6
Clean data with REGEXREPLACE before converting
If you have currency signs or letters, run =VALUE(REGEXREPLACE(A2, "[^0-9.-]", "")) to strip non-numeric characters, then convert.
Tip: Escaped characters are essential in JSON; ensure the regex string is properly quoted in formulas. - 7
Combine methods for mixed data
For datasets with mixed text and numbers, nest methods: =IFERROR(VALUE(A2), REGEXREPLACE(A2, "[^0-9.-]", "")) may yield robust results.
Tip: Always verify edge cases like missing values or text with letters. - 8
Apply across an entire column
Use ARRAYFORMULA to apply conversions across a range, e.g., =ARRAYFORMULA(VALUE(A2:A)). This avoids manual fill-down.
Tip: Ensure you exclude header rows and handle blank cells to prevent errors. - 9
Validate results with quick checks
Run basic analytics (SUM, AVERAGE) on the converted range and compare with expectations. Spot-check random rows to ensure accuracy.
Tip: If sums differ, re-check for stray non-numeric characters or incorrect separators. - 10
Document the chosen method
Keep a brief note in the sheet about which method you used and under which data conditions. This helps future maintenance.
Tip: Add comments or a separate legend column for governance.
FAQ
What is the simplest way to convert text to numbers in Google Sheets?
For straightforward cases, start with VALUE(A2) or the double unary trick (--A2). If locale separators differ, NUMBERVALUE is the best choice. Always test on a sample before applying to a full column.
For simple cases, use VALUE or the double unary method. If your locale uses different decimal marks, NUMBERVALUE is the better choice.
How should I handle numbers with currency signs?
Strip non-numeric characters first using REGEXREPLACE, then convert. For example, VALUE(REGEXREPLACE(A2, "[^0-9.-]", "")) turns '$1,234.56' into 1234.56.
Remove symbols with a regex first, then convert.
Can I apply a conversion to an entire column without dragging formulas?
Yes. Use ARRAYFORMULA to apply conversions across the range, such as =ARRAYFORMULA(VALUE(A2:A)). Ensure the header row is excluded and blanks are handled.
Use ARRAYFORMULA to apply the conversion across the whole column.
What if data mixes text and numbers?
Use a guarded approach like IFERROR(VALUE(A2), REGEXREPLACE(A2, "[^0-9.-]", "")). This handles both numeric-like text and text with non-numeric characters.
Guard with IFERROR to cover mixed data scenarios.
Why do some conversions fail with VALUE?
VALUE only accepts text that strictly looks like a number. If there are hidden characters or locale mismatches, try cleaning first or using NUMBERVALUE with explicit separators.
VALUE can fail when non-numeric characters are present; cleaning or NUMBERVALUE helps.
Watch Video
The Essentials
- Back up data before converting
- VALUE, NUMBERVALUE, and double unary are core methods
- Clean data with REGEXREPLACE when needed
- Validate results with quick checks

