Skip to main content

How to mass convert numbers stored as text to numbers in Excel?

Author: Siluvia Last Modified: 2025-07-15

When working with Excel, you may encounter situations where hundreds of numbers are inadvertently stored as text across your worksheet. This often happens when data is imported from other systems or files, causing numbers to be formatted as text and resulting in calculation errors or issues when performing mathematical operations. Manually converting each cell is not practical, especially with large datasets. This guide outlines multiple effective methods for batch converting numbers stored as text into true numbers in Excel, streamlining your workflow and ensuring data consistency.

Mass convert connective numbers stored as text to numbers in Excel
Mass convert scattered numbers stored as text to numbers in Excel
Mass convert numbers stored as text to numbers with several clicks
Excel Formula - Convert text to numbers with the VALUE function
VBA Code - Use macro to programmatically convert text to numbers


Mass convert connective numbers stored as text to numbers in Excel

If the numbers stored as text are contiguous (next to each other in one or more blocks) within your worksheet, Excel provides a simple tool to convert them to numbers efficiently. The typical scenario for this is when imported data, such as columns of numbers, ends up treated as text, which may be indicated by a green triangle in the corner of each cell.

1. Highlight the contiguous range containing numbers stored as text. After selection, a small exclamation button little button will appear near the selected area. Click this button.

numbers which stored as text

2. From the menu that appears, select Convert to Number. Excel will instantly convert all selected text-formatted numbers into proper numerical values.

click Convert to Number from the drop-down list

This approach is straightforward for blocks of data and avoids the need for formula-driven or manual conversion. The converted numbers can now be used in calculations as intended.

Tip: If the button does not appear, double-check that your data is detected as text (you can check formatting under Home > Number Format). This method is best for contiguous ranges; for non-contiguous cells, see the following solutions.


Easily convert text to number or vice versa in Excel:

Kutools for Excel's Convert between Text and Number utility helps you easily convert all text to number or vice versa of selected range in Excel as the below demo shown. Download and try it now! (30-day free trail)

convert text to number or vice versa by kutools


Mass convert scattered numbers stored as text to numbers in Excel

In cases where numbers formatted as text are distributed throughout your worksheet (not in one continuous range), manually converting them one by one can be time-consuming. Excel’s Paste Special feature enables you to convert these scattered cells simultaneously.

1. Enter a number "1" into any blank cell, and copy it by pressing Ctrl + C. Then, while holding the Ctrl key, select all the non-contiguous cells you wish to convert—click each one or drag to highlight as needed. With your selection active, press Ctrl + Alt + V (this opens the Paste Special dialog box).

2. In the Paste Special dialog, under the Operation section, choose Multiply, then click OK. See screenshot:

select the Multiply option in the Operation section

This operation multiplies each selected cell by 1, forcing Excel to treat the values as numbers. The numbers are instantly converted without changing their actual values.

Note: The Multiply function only works if the cell contents are recognized as numeric text (i.e., no non-numeric characters). If your data contains extra spaces or non-number characters, consider cleaning the data first. This method is especially useful when dealing with scattered data or when the “Convert to Number” button is not available.


Mass convert numbers stored as text to numbers with Kutools for Excel

The Convert between Text and Number utility of Kutools for Excel can help you easily convert all numbers which stored as text to numbers in a range or multiple ranges.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select either a contiguous block of cells or multiple ranges that you wish to convert, and then click Kutools > Content > Convert between Text and Number.

click Convert between Text and Number feature of kutools

2. In the Convert between Text and Number dialog box, select the Text to number option. Click the OK button to perform the conversion.

select the Text to number option in the dialog box

All selected cells will be immediately converted from text-formatted numbers to true numbers, regardless of whether they are contiguous or scattered.

This tool is very versatile, supporting partial selection, entire columns, or even multiple ranges. It also reduces potential human errors from manual conversions, making it ideal for batch conversions on large datasets.

  If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.


Excel Formula - Convert text to numbers with the VALUE function

For users who want to maintain full control over the conversion process or need a solution compatible with dynamic data, Excel offers the VALUE function. This formula converts text representations of numbers into true number values, which is particularly effective when preparing data for further calculations or when data is being regularly updated.

Applicable scenarios: This method is ideal for datasets where you want to convert one column or a range and retain the original data (since the output goes into a separate column). It works well even when the data contains text-number mixes or is being appended over time.

Steps:

1. Suppose you have text-formatted numbers in column A, starting from cell A1. In the corresponding cell of column B (for example, B1), enter the following formula:

=VALUE(A1)

2. Press Enter to confirm the formula. Then, to apply this conversion to the rest of your data, drag the fill handle down from B1 to cover as many rows as required.

Tip: If you want to replace the original cells with the converted numbers, after generating the results, copy the results in column B, right-click the original range, and select "Paste Values" to overwrite the text with actual numbers. Be cautious: back up your original data before pasting if necessary.

Precautions:

  • If the cell contains non-numeric text, VALUE will return a #VALUE! error. Make sure your data contains text that represents numbers only.
  • Formatting issues, such as leading/trailing spaces, may cause unexpected results. Consider cleaning the data with TRIM or CLEAN functions first, if necessary.

VBA Code - Use macro to programmatically convert text to numbers

For more advanced users or those handling very large datasets, automating the conversion process with a VBA macro can save significant time and repeated effort. VBA allows you to programmatically convert numbers stored as text into real numbers for an entire selection, column, or worksheet. This is especially useful when dealing with regularly updated workbooks or for building repeatable workflows.

Applicable scenarios: This method suits users familiar with macros or anyone needing to perform bulk conversion operations across multiple and dynamic areas of a workbook. It’s particularly effective for recurring tasks and can also be bundled with other data-cleansing steps.

Steps to use the VBA macro:

1. Go to Developer tab > Visual Basic. In the window that appears, click Insert > Module, and paste the following code into the module window:

Sub ConvertTextNumbersToNumbers()
    Dim rng As Range
    Dim WorkRng As Range
    On Error Resume Next
    xTitleId = "KutoolsforExcel"
    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Please select the range to convert text to number", xTitleId, WorkRng.Address, Type:=8)
    For Each rng In WorkRng
        If IsNumeric(rng.Value) And VarType(rng.Value) = vbString Then
            rng.Value = Val(rng.Value)
        End If
    Next
End Sub

2 To execute the code, click the Run button Run button or press F5. A dialog box will prompt you to select the range for conversion. Select the cells containing numbers stored as text and confirm.

Tips and precautions:

  • This macro processes each cell only if it is a string-represented number. Data such as alphabetic text or errors will be left unchanged.
  • Always back up your worksheet before running macros, in case you need to restore your original data.
  • The macro can be adjusted for whole columns or specific sheets by modifying the portion that sets WorkRng.
  • If your workbook has already enabled macros, this approach works seamlessly. If macros are disabled, enable them as prompted by Excel.

This VBA approach is highly customizable and can be expanded to include additional data-cleaning steps. It is especially effective for routine processing of large-scale or frequently updated datasets.


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!