Function Problems

How to Remove Non-Breaking Spaces from Numbers in Excel

Ayan MasoodAyan Masood Nov 2, 2026 872 views

Question details

The user needs to remove invisible non-breaking spaces from numbers copied from external sources like Outlook so they can be accurately recognized as numeric values in Excel.

How to Remove Non-Breaking Spaces from Numbers in Excel
Product
Excel
Device & OS
not provided
Scenario
Cleaning up imported data copied from Outlook or web sources that contains non-breaking spaces instead of standard spaces.
Observed behavior
Standard TRIM functions fail to remove the trailing spaces, causing the numbers to be treated as text strings, which leads to calculation errors.
Before you start

Identify the columns containing the problematic data and ensure you have an empty adjacent column available if you plan to use a formula-based solution.

Solution 1Recommended

Use the SUBSTITUTE and CHAR Functions

Replace the non-breaking space character code with an empty string and mathematically convert the result back to a number.

The standard TRIM function only removes standard spaces (character code 32). Non-breaking spaces use character code 160. To properly clean the data, you must isolate this specific character code using the SUBSTITUTE function.

1
Select an adjacent cell

Click on an empty cell next to your problematic number. For example, if your number is in cell C7, select D7.

2
Enter the substitution formula

Type the formula =SUBSTITUTE(C7,CHAR(160),"")*1 into the formula bar. The CHAR(160) component identifies the non-breaking space, while multiplying by 1 forces Excel to store the cleaned result as a numeric value.

3
Apply to your dataset

Press Enter to execute the formula. Click the cell again and drag the fill handle down to apply this formatting to the rest of the column.

Use the SUBSTITUTE and CHAR Functions
Formatting Tip: If you don't want to use the *1 method, you can also wrap the formula in the VALUE function like this: =VALUE(SUBSTITUTE(C7,CHAR(160),"")).
Advanced Data Cleaning with WPS Spreadsheet

Remove Non-Breaking Spaces Easily in WPS Spreadsheet

WPS Spreadsheet is a powerful, free, and lightweight alternative to Microsoft Excel. It offers full compatibility with Excel formulas, allowing you to use SUBSTITUTE, CHAR, and TRIM functions to clean up your imported data effortlessly while providing a highly familiar user interface.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the document containing the imported numbers.
  2. 2. Enter the cleaning formula: Select an empty column next to your data and enter =SUBSTITUTE(A1,CHAR(160),"")*1 into the formula bar.
  3. 3. Fill the column: Press Enter, then double-click or drag the fill handle in the bottom right corner of the cell to rapidly clean your entire dataset.
Fully compatible with standard Microsoft Excel formulas and character codesSupports seamless data import from Outlook, web pages, and external databasesFree, lightweight, and fast alternative for heavy data processing tasksIntuitive interface for zero learning curve during migration
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the TRIM function remove non-breaking spaces?

The standard TRIM function is programmed to recognize and remove only standard ASCII spaces, which use character code 32. Non-breaking spaces, often generated when copying from web pages or Outlook emails, use character code 160. Because it is a different character entirely, TRIM ignores it.

How do I convert text to numbers after removing spaces?

When you use text-manipulation functions like SUBSTITUTE, the result is formatted as a text string. You can convert it back to a number by performing a mathematical operation on it, such as multiplying the formula result by 1 (e.g., adding *1 to the end), or by wrapping the entire formula in the VALUE() function.

What is the CLEAN function and does it remove non-breaking spaces?

The CLEAN function is specifically designed to remove non-printable characters from text, which correspond to character codes 0 through 31. Because the non-breaking space operates on character code 160, the CLEAN function cannot remove it. You must rely on SUBSTITUTE and CHAR(160) instead.

Can I remove non-breaking spaces without using formulas?

Yes, you can use the Find and Replace utility. Because you cannot type a non-breaking space using your spacebar, you must highlight the invisible space directly from the cell, copy it, and paste it into the 'Find what' box in the Find and Replace dialog. Leave the 'Replace with' box empty and click 'Replace All'.