How to Fix Excel Functions Not Working with Yahoo Finance Data
Question details
Excel formulas and functions fail to calculate correctly when applied to data imported from Yahoo Finance.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Importing financial metrics and stock data from Yahoo Finance into Excel for analysis and calculation.
- Observed behavior
- Formulas return errors (such as #VALUE!) or do not compute because the imported numerical data is formatted as text, contains hidden spaces, or includes unexpected symbols.
Before troubleshooting, widen your data columns and double-click a few cells to check for hidden trailing spaces or non-breaking characters that commonly accompany web-imported data.
Clean Data Using Excel Functions (TRIM, CLEAN, and VALUE)
Extract pure numerical values from text-formatted web data by combining data cleaning formulas.
Yahoo Finance data often includes hidden, non-breaking spaces or web-based text formatting that standard copy-pasting cannot fix. Using a nested combination of data cleaning formulas will strip away these hidden characters and convert the strings back into calculable numbers.
Select a blank column immediately next to your imported Yahoo Finance data.
Type the formula =VALUE(TRIM(CLEAN(A2))) into the first blank cell (assuming A2 contains your target data). The CLEAN and TRIM functions remove non-printable characters and spaces, while VALUE converts the result into a number.
Press Enter, then drag the fill handle at the bottom-right corner of the cell downwards to apply this formula to the rest of the column.
Copy the newly calculated column, right-click the original data range, and select 'Paste as Values' (the clipboard icon with a 123) to permanently overwrite the problematic formatting.

Use Power Query to Transform Data
Use Power Query to automatically detect and correct data types and formatting issues during the data import process.
Convert Text to Numbers via Text to Columns
Quickly force Excel to re-evaluate a column of text-formatted numbers without using formulas.
Clean Yahoo Finance Data Easily with WPS Spreadsheet
WPS Spreadsheet offers a highly compatible and lightweight environment to handle complex financial data. It includes built-in data transformation tools and fully supports the data-cleaning formulas needed to normalize web-imported data.
- 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your imported Yahoo Finance data.
- 2. Select the problematic data: Highlight the column where numbers are stored as text or formulas are failing.
- 3. Launch Text to Columns: Navigate to the Data tab and click on the 'Text to Columns' icon.
- 4. Convert the format: Choose 'Delimited', clear any delimiter options, select 'General' as the data format in the final step, and click Finish.
- 5. Apply formulas: Your data is now properly formatted as numbers. You can apply standard mathematical functions without encountering errors.

Frequently Asked Questions
Why does Excel treat my imported Yahoo Finance numbers as text?
When data is exported or copied from web sources like Yahoo Finance, it often includes HTML formatting, non-breaking spaces, or currency symbols that Excel interprets as text strings rather than pure numeric values. This prevents standard calculation formulas from working.
Does changing the cell format to 'Number' fix the calculation error?
No, simply changing the cell format via the ribbon from 'General' to 'Number' does not change the underlying data type if the cell already contains text or hidden characters. You must re-evaluate the data using Text to Columns, Power Query, or a function like VALUE.
How do I remove unexpected currency symbols from my dataset?
You can use the SUBSTITUTE function to strip out specific characters. For example, entering =VALUE(SUBSTITUTE(A2, "$", "")) will remove the dollar sign from cell A2 and convert the remaining text string into a calculable number.




