Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Turn String into Number in Excel: 5 Easy Methods

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To turn a string into a number in Excel, the fastest way is to select the cells with the green triangle error indicator, click the warning icon that appears, and select Convert to Number. This immediately changes text-formatted digits into actual numeric values that can be used in calculations. This process is essential because Excel cannot perform mathematical operations like SUM or AVERAGE on cells it perceives as text, even if those cells contain digits.

What You'll Need

  • A Microsoft Excel workbook containing "numbers stored as text."
  • Basic access to the Home tab and Formula bar.

Step-by-Step

Depending on how your data is formatted and how much of it you have, different methods may be more efficient. Note that menu labels may differ slightly based on your version of Excel or region.

Method 1: Using the Error Warning (Best for small batches)

  1. Select the cell or range of cells that contain the numbers stored as text. You will typically see a small green triangle in the top-left corner of these cells.
  2. Look for the small yellow diamond warning icon (an exclamation mark) that appears next to the selected cells.
  3. Click the warning icon to open the dropdown menu.
  4. Select Convert to Number.

Method 2: Using the VALUE Function (Best for creating a new column)

  1. Click in an empty cell next to the text string you want to convert.
  2. Type =VALUE( and then click the cell containing the text number (e.g., =VALUE(A2)).
  3. Press Enter.
  4. Hover over the bottom-right corner of the cell (the fill handle) and drag it down to apply the formula to the rest of the column.
  5. (Optional) To remove the formula and keep only the number, copy the new column, right-click the destination, and select Paste Values.

Method 3: Using Text to Columns (Best for large datasets)

  1. Highlight the column containing the strings you want to convert.
  2. Go to the Data tab on the top ribbon.
  3. Click on Text to Columns.
  4. In the wizard that appears, leave the settings as Delimited and click Next.
  5. Uncheck all delimiters (like Tab or Comma) and click Next.
  6. In the "Column data format" section, ensure General is selected.
  7. Click Finish. Excel will re-evaluate the cells and convert them to numbers.

Method 4: Using "Paste Special" Multiplication (The "Force" Method)

  1. Find an empty cell anywhere in your sheet and type the number 1.
  2. Copy that cell (Ctrl + C).
  3. Select the range of cells containing the text strings.
  4. Right-click the selection and choose Paste Special....
  5. In the dialog box, under the "Operation" section, select Multiply.
  6. Click OK. Multiplying a text-number by 1 forces Excel to treat the result as a number.

Method 5: Changing the Cell Format

  1. Select the cells formatted as text.
  2. Go to the Home tab.
  3. In the Number group, click the dropdown menu (which likely says "Text") and select General or Number.
  4. Note: Simply changing the format often doesn't work immediately. You may need to double-click into the cell and press Enter for the change to take effect.

Common Mistakes

  • Ignoring Non-Numeric Characters: Trying to convert a string like "$100" or "10kg" using the VALUE function will result in a #VALUE! error. You must first remove the currency symbol or text unit using Find and Replace (Ctrl + H).
  • Applying Format Only: Many users change the cell format to "Number" and wonder why the data is still left-aligned (a sign it's still text). Formatting only changes how future data is entered; it doesn't always convert existing data.
  • Deleting Source Data Too Early: When using the VALUE function, users often delete the original text column before "Pasting as Values," which breaks the formula and results in errors.

Tips

  • Visual Cue: By default, Excel aligns text to the left and numbers to the right. If your "numbers" are hugging the left side of the cell, they are likely strings.
  • Clean Data First: Use the TRIM() function if your strings have hidden leading or trailing spaces, as these can sometimes interfere with conversion.
  • Keyboard Shortcut: For Method 4, instead of navigating menus, you can use the Paste Special shortcut (Ctrl + Alt + V) to reach the Multiply option faster.

Troubleshooting

If the numbers still won't convert, try these steps in order:

  1. Check for Hidden Spaces: Sometimes a cell looks like "123" but is actually "123 ". Use =LEN(cell) to see if the character count is higher than expected. Use Find and Replace to remove spaces.
  2. Check Decimal Separators: If you are using a version of Excel set to a region that uses commas as decimals (e.g., Europe) but your data uses periods, Excel will see it as text. Change your system regional settings or use Find and Replace to swap periods for commas.
  3. Clear All Formatting: Go to Home > Clear > Clear Formats and then attempt the Text to Columns method again.
  4. Restart the Application: In rare cases of extreme lag or glitching with large datasets, saving your work and restarting Excel can refresh the calculation engine.

Frequently Asked Questions

Why does Excel store my numbers as text?

This usually happens when data is imported from a CSV file, a database, or a website. It can also happen if the cell was formatted as "Text" before the number was typed in.

Will converting strings to numbers delete my data?

No, these methods only change the data type. However, if you use the VALUE function in a new column, ensure you "Paste Values" before deleting the original column to avoid losing your data.

What is the #VALUE! error?

This error occurs when you try to perform a mathematical operation or use the VALUE function on a cell that contains non-numeric characters (like letters or symbols) that Excel cannot interpret as a number.

Can I convert a whole column at once?

Yes, the "Text to Columns" method is the most efficient way to convert an entire column of thousands of rows instantly.

Does the "Convert to Number" warning appear for every cell?

No, it only appears if Excel detects a number that is formatted as text. If the cell contains a mix of letters and numbers, Excel will treat it as standard text and will not show the warning.