Formula Errors

How to Fix Excel Cannot Divide Numbers Copied from a Website

Amos GikundaAmos Gikunda Oct 26, 2026 868 views

Question details

Users are unable to perform division calculations on numbers copied and pasted directly from a website due to hidden spaces or characters.

How to Fix Excel Cannot Divide Numbers Copied from a Website
Product
Microsoft Excel
Device & OS
not provided
Scenario
Calculating division formulas using data imported or copied from external web pages.
Observed behavior
Excel returns a formula error (such as #VALUE!) because the copied numbers are treated as text due to embedded spaces or hidden web characters. Manually entered numbers calculate without issues.
Before you start

Before applying bulk formatting changes to your data, make a backup copy of your worksheet to prevent accidental data loss during the cleaning process.

Solution 1Recommended

Use Find and Replace to Remove Hidden Spaces

This is the fastest method to clean up trailing or leading spaces that prevent Excel from recognizing copied web data as calculation-ready numbers.

Websites frequently format numbers with invisible spaces. Removing these spaces forces Excel to re-evaluate the cell contents as numerical values, allowing division formulas to function correctly.

1
Format cells as Number

Select the affected cells containing the copied web numbers. Navigate to the Home tab, click the Number Format dropdown menu, and choose 'Number' or 'Currency'.

2
Open the Replace dialog

Stay on the Home tab, click 'Find & Select' in the Editing group, and choose 'Replace' from the dropdown menu, or press Ctrl+H on your keyboard.

3
Execute the space removal

Click inside the 'Find what' field and press the spacebar once to enter a single space. Leave the 'Replace with' field completely empty.

4
Apply changes

Click the 'Replace All' button. Excel will remove all hidden spaces, instantly converting the text into usable numbers for your division formulas.

Use Find and Replace to Remove Hidden Spaces
Instant Calculation: Once the spaces are removed, your existing division formulas should automatically update and display the correct mathematical results.
Clean Data Easily

Clean and Calculate Copied Web Data with WPS Spreadsheet

WPS Office Spreadsheet provides excellent compatibility with Microsoft Excel formats and offers intuitive data cleaning tools like Find & Replace and the TRIM function to quickly fix text-to-number errors.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing the copied web data.
  2. 2. Select the problematic data: Highlight the cells containing the numbers that are returning division errors.
  3. 3. Access Find and Replace: Press Ctrl+H on your keyboard to immediately bring up the Replace dialog box.
  4. 4. Remove hidden spaces: Type a single space in the 'Find' box, leave 'Replace' completely blank, and click 'Replace All'.
  5. 5. Verify your formulas: Check your division formulas; they will now calculate instantly without the #VALUE! error.
Instantly clean hidden web spaces with advanced Find & ReplaceFully compatible with Microsoft Excel formulas and number formattingLightweight, fast, and completely free to useBuilt-in text conversion tools for professional data processing
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel treat numbers copied from websites as text?

Websites often use non-breaking spaces ( ) or other invisible HTML formatting characters. When pasted into Excel, these characters cause the application to interpret the entire cell as a text string rather than a numerical value, which prevents mathematical operations like division.

What if Find and Replace doesn't remove the web spaces?

If a standard space removal doesn't work, the website likely used a non-breaking space (character code 160). You can remove this by using the formula =SUBSTITUTE(A1, CHAR(160), "") or by typing Alt+0160 into the 'Find what' box during a Find and Replace operation.

How do I quickly convert text to numbers after removing spaces?

Select the cleaned cells. If you see a small yellow warning icon next to your selection, click it and choose 'Convert to Number'. Alternatively, you can use the 'Text to Columns' feature under the Data tab and simply click 'Finish' to force the conversion.