How to convert text to number in excel
Tutor 5 (120 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To convert text that looks like numbers into real numeric values in Excel,
you can use functions (VALUE, NUMBERVALUE), simple math operations (multiply by
1 / add 0), Paste Special, Text to Columns, Error Checking, or VBA for
large/recurring tasks. Below are the major methods, troubleshooting tips, and
best practices.
Using the VALUE Function
·
What it does: Converts text in
a recognized numeric, date, or time format into a number.
·
How to use: =VALUE(A1) where A1 contains the text-formatted number.
Multiplying by 1 or Adding 0
·
Quick helper-column method: In
a helper column enter =A1*1
or =A1+0.
·
Then: Copy the formula down,
copy the results, and Paste Special → Values over the original if you want to
replace them.
Using Paste Special (Multiply)
1. Type
1 in any empty cell.
2. Copy
that cell (Ctrl+C / Cmd+C).
3. Select
the text-number cells.
4. Right-click
→ Paste Special → Operation: Multiply → OK.
This forces Excel to convert text to numbers.
Text to Columns Method
·
When to use: Fast one-step
conversion when numbers are in a single column.
·
How to use: Select the column →
Data tab → Text to Columns → Click Finish
immediately. (Does not split data if no delimiter is found.)
Using the Error Checking Option
·
Excel displays a green triangle for numbers
stored as text.
·
Click the cell(s) → click the error icon →
choose Convert to Number.
·
Works well for small selections or highlighted
ranges.
NUMBERVALUE Function
·
Handles locale separators: =NUMBERVALUE(A1, decimal_separator, group_separator)
·
Example: =NUMBERVALUE(A1,
",", ".") if the decimal separator is a
comma.
Removing Non-Numeric Characters before Conversion
·
Clean spaces / non-printables: =CLEAN(TRIM(A1))
·
Remove specific characters (e.g., $):
=SUBSTITUTE(A1,"$","")
then convert.
·
Clean first, then use VALUE or math conversion.
Handling Dates Stored as Text
·
Use =DATEVALUE(A1)
to convert text dates into Excel serial date numbers.
·
After conversion, format the cell as a Date to
display correctly.
Converting Multiple Columns / Bulk Fixes
·
Remove hidden spaces: Select
columns → Ctrl+H (Cmd+H) → Find what: single space → Replace with: (leave
blank) → Replace All.
·
For large/recurring conversions, consider a
macro (see VBA below).
VBA Method for Large Datasets
· Quick macro:
Sub ConvertTextToNumber()
Selection.Value = Selection.Value
End Sub
·
Select the cells to convert, run the macro. Use
when you need to repeat conversions across many ranges.
Identifying Text Numbers
·
Alignment: Text aligns left by
default, numbers align right.
·
Functions: =ISTEXT(A1) returns TRUE for text
values.
·
Counts: COUNT ignores text; COUNTA counts non-empty cells.
Common Conversion Issues
·
Leading apostrophes (') —
remove using Find & Replace (find: ',
replace: empty) or use error-check Convert to Number.
·
Scientific notation for long numbers
— format cells as Number (0 decimal places) before entering or store as Text
with custom format if needed.
·
Array size mismatches — when
using formulas across ranges, ensure dimensions match.
Preserving Leading Zeros
·
Converting to number will strip leading zeros.
To preserve codes like 0012:
o
Keep as Text format, or
o
Use a Custom number format like
"0000" (for fixed
width), or
o
Store the original text separately before
converting.
Best Practices
·
Always back up or copy the original
data before bulk conversions.
·
Clean data first (TRIM, CLEAN,
SUBSTITUTE) to remove stray
characters.
·
Use VALUE or math operations
for quick one-off fixes; use NUMBERVALUE for locale-aware
conversions.
·
Prefer Text to Columns or Paste
Special for fast, simple conversions.
·
Use VBA for repeatable,
large-scale operations.
·
Verify conversion by checking alignment, ISTEXT, or running SUM/AVERAGE
to ensure numeric behavior.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to track changes in excel
Answers · 1
How to lock certain cells in excel
Answers · 1
How to merge two excel spreadsheets
Answers · 1
Where is the name box in excel
Answers · 1