Data Import & Export

How to Remove Spaces from Imported Text and Convert to Numbers in Spreadsheet

Ayan MasoodAyan Masood Nov 10, 2026 869 views

Question details

The user needs to clean up imported data by removing regular or nonbreaking spaces from numerical text (e.g., 1 359,48) to convert them into standard usable numbers.

How to Remove Spaces from Imported Text and Convert to Numbers
Product
Spreadsheet
Device & OS
not provided
Scenario
Importing numerical data from external sources, such as web pages or databases, where thousand separators appear as spaces, causing the system to format them as text instead of numbers.
Observed behavior
The imported numbers are treated as text strings because of the embedded spaces, preventing mathematical calculations or data analysis from functioning correctly.
Before you start

Before modifying your data, it is recommended to format the target cells as 'General' or 'Number' to ensure the cleaned text converts correctly without default text formatting.

Solution 1Recommended

Use Find and Replace to Remove Regular Spaces

The fastest method to convert text to numbers when standard spaces are used as thousand separators.

This built-in tool is ideal for quickly stripping out normal spaces across thousands of rows of data simultaneously.

1
Select the Data

Highlight the specific column or range of cells containing the imported text values.

2
Open Find and Replace

Press the keyboard shortcut Ctrl+H to immediately open the Find and Replace dialog box.

3
Execute the Replacement

Enter a single space in the 'Find what' field, leave the 'Replace with' field completely empty, and click the 'Replace All' button.

Use Find and Replace to Remove Regular Spaces
Quick Conversion: Once the spaces are removed, the spreadsheet will automatically recognize the remaining characters as valid numeric values.
Clean Imported Data Faster

Easily Convert Text to Numbers in WPS Spreadsheet

WPS Spreadsheet offers an intuitive interface and advanced functions designed to clean up messy imported data effortlessly. Process thousands of rows of data with zero lag.

  1. 1. Open your file: Launch WPS Spreadsheet and open the document containing your imported text data.
  2. 2. Select the target column: Click the column header to highlight all cells with the unwanted spaces.
  3. 3. Apply Find & Replace: Press Ctrl+H, type a space in 'Find what', leave 'Replace with' blank, and hit 'Replace All'.
  4. 4. Perform Calculations: Your data is instantly converted to actual numbers, ready for SUM, AVERAGE, and other formulas.
Fully compatible with Microsoft Excel file formats and functionsQuickly remove nonbreaking spaces with built-in text formulasLightweight design ensures smooth performance with massive datasetsFree to download and use for all your daily data processing tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why didn't Find and Replace remove the spaces from my imported numbers?

When data is copied from web pages or specific external databases, spaces are often formatted as 'nonbreaking spaces' (character code 160). A regular Find and Replace looks for standard spaces (character code 32), so it ignores them. You must use the SUBSTITUTE function with CHAR(160) to remove them.

How do I fix issues with commas and decimal points after removing spaces?

If your imported text uses a comma as a decimal separator (e.g., 1 359,48) but your regional computer settings use a period, the conversion to numbers may fail. You can nest another SUBSTITUTE function to replace the comma with a period before using the VALUE function.

Is there a way to permanently replace the formula results with raw numbers?

Yes. Once you have used the SUBSTITUTE formula to clean your numbers, select the formula column, press Ctrl+C to copy, then right-click the same selection and choose 'Paste Special' > 'Values'. This removes the underlying formulas and leaves only the pure numerical data.