Number Conversion in Excel: Solving Common Text-to-Number Issues
Microsoft Excel is a powerhouse for data analysis and financial tracking. However, anyone who has worked extensively with Excel knows that formatting issues—particularly dealing with numbers stored as text—can bring your productivity to a grinding halt. If your SUM formula is returning zero despite a column full of numbers, you’ve likely encountered this exact issue.
In this comprehensive guide, we’ll walk you through common Excel number conversion problems and provide clear, actionable solutions.
The Problem: Numbers Stored as Text
One of the most frequent frustrations in Excel occurs when importing data from other systems, like CSV files or web databases. Often, these external sources export numerical data as text strings. While they might look like normal numbers to you, Excel treats them like words, which means you cannot perform mathematical operations on them.
You can usually spot this issue easily: Excel will flag the cell with a small green triangle in the upper-left corner. When you click the cell, a warning icon appears with the message “Number Stored as Text.”
Solution 1: The Quick Fix Warning Icon
If you’re dealing with a small dataset, the quickest way to fix this is by utilizing Excel’s built-in warning system.
- Select the cell or range of cells containing the green warning triangles.
- Click the small yellow warning icon that appears next to the selection.
- Choose Convert to Number from the dropdown menu.
Excel will instantly convert the text strings into functional numerical values. While this works beautifully for small ranges, it can be slow or crash Excel if you attempt it on hundreds of thousands of rows.
Solution 2: The VALUE Function
For larger datasets or when building robust formulas, the VALUE function is your best friend. This function takes a text string that represents a number and converts it into a true numerical value.
Syntax: =VALUE(text)
Example:
If cell A2 contains the text “150.50”, typing =VALUE(A2) into cell B2 will output the actual number 150.50, which can then be summed or averaged normally.
Converting Numbers into Words in Excel
Sometimes, you need to go the other direction. If you are generating invoices, printing checks, or writing numbers in words for legal documents in Excel, you might need to convert a numerical value into its written word equivalent (e.g., converting “150” to “One Hundred Fifty”).
Excel does not have a built-in formula for this specific task out-of-the-box, but there are powerful workarounds.
The SpellNumber VBA Function
Much like handling text-to-number conversion in programming, the most common method used by advanced Excel users is to create a Custom Function using Visual Basic for Applications (VBA). Microsoft explicitly provides the code for a function called SpellNumber.
By opening the VBA editor (Alt + F11), inserting a new module, and pasting the standard Microsoft SpellNumber code, you can create your own formula. Once saved, you can simply type =SpellNumber(A2) in your spreadsheet, and Excel will spell out the number.
The NUMBERTEXT Add-in
If you prefer not to mess with VBA macros, you can install a third-party add-in like NUMBERTEXT. This powerful open-source add-in provides the =NUMBERTEXT() function, which can translate numbers into words across dozens of different languages and currencies.
The TEXT Function for Custom Formatting
What if your numbers are correctly formatted as numbers, but you need them to appear as text in a very specific format (like adding leading zeros to zip codes or formatting dates)? This is where the TEXT function shines.
Syntax: =TEXT(Value, "Format_Text")
Example:
If you have the number 45 and need it to be a five-digit zip code format (00045), you would use =TEXT(45, "00000"). This converts the number into a text string tailored precisely to your specifications.
A Quick and Easy Alternative: Online Converters
Dealing with VBA macros and complex Excel formulas isn’t for everyone. If you only have a few numbers you need to convert into words for an email or a quick document, setting up an Excel macro is overkill.
For a fast, hassle-free alternative, you can always use our free online converter. Whether you need to convert massive numbers into words or decode written numbers back into digits, our browser-based tool handles it instantly—no spreadsheets required!