Excel Error Codes

Fix Excel STOCKHISTORY #VALUE! Non-Trading Day Error for XNAS Stocks

Nimra MalikNimra Malik Oct 13, 2026 868 views

Question details

Users need to resolve a #VALUE! error in Excel's STOCKHISTORY function that inaccurately labels valid dates as non-trading days for NASDAQ stocks.

How to Fix Excel STOCKHISTORY #VALUE! Non-Trading Day Error for XNAS Stocks
Product
Microsoft Excel
Device & OS
not provided
Scenario
Retrieving historical price data for NASDAQ-listed symbols (like AMZN, META, MSFT, and AAPL) using the STOCKHISTORY formula.
Observed behavior
The STOCKHISTORY formula returns a #VALUE! error, identifying valid trading dates as non-trading days, even though the standard Excel Data Types feature still returns current stock prices.
Before you start

Ensure your internet connection is stable and verify that your Microsoft 365 subscription is active, as STOCKHISTORY relies on premium cloud services to fetch market data.

Solution 1Recommended

Use the Excel Stocks Data Type for Current Prices

Since the STOCKHISTORY function is experiencing backend data source issues with XNAS, you can use the built-in Stocks Data Type to fetch the current price and basic details as a temporary workaround.

This data source glitch specifically affects historical data retrieval via STOCKHISTORY. The standard Stocks data type uses a different data feed for current metrics, which remains unaffected.

1
Enter the Stock Symbol

Type the NASDAQ stock symbol (e.g., AAPL or MSFT) into a blank cell in your spreadsheet.

2
Convert to a Data Type

Select the cell, navigate to the Data tab on the ribbon, and click on Stocks in the Data Types group.

3
Extract Market Data

Click the small 'Insert Data' icon that appears next to the cell and select 'Price' (or any other required metric) to extract the current trading data into adjacent cells.

Use the Excel Stocks Data Type for Current Prices
Limitation Note: This method only retrieves current or delayed prices, not historical arrays. You will need to wait for Microsoft to fix the historical XNAS data feed for STOCKHISTORY to work correctly again.
Free Microsoft Office alternative

Experience Error-Free Spreadsheets with WPS Office

Tired of encountering subscription-based data errors in Microsoft Excel? Switch to WPS Office. It provides a free, lightweight, and highly compatible alternative with robust features, an intuitive interface, and seamless migration for all your spreadsheet tasks.

  1. 1. Download WPS Office: Visit the official WPS website to download the free installation package for your device.
  2. 2. Install the Software: Run the installer and follow the quick on-screen instructions to set up the suite.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and instantly open your existing Excel workbooks without losing any formatting.
Free and lightweight office software suitePerfect format compatibility with Microsoft Excel (.xlsx) filesFamiliar user interface requires no learning curvePowerful built-in formulas for comprehensive data analysis
microsoft office alternative - wps office

Frequently Asked Questions

Why does STOCKHISTORY show a #VALUE! error for a regular trading day?

This occurs when Excel's third-party market-data provider supplies incorrect trading calendar data to the system, mistakenly identifying a regular business day as a market holiday or non-trading day.

Does this data error affect all global stock exchanges in Excel?

No. Based on user reports, this specific error is predominantly isolated to the XNAS (NASDAQ) data source. Other exchanges, such as European markets, typically continue to function normally during these outages.

Can I still get the current price of XNAS stocks when STOCKHISTORY is broken?

Yes, you can use the built-in Stocks Data Type found in the Data tab. Even when historical data retrieval fails due to a STOCKHISTORY glitch, the real-time or delayed current price data usually remains accessible.

Will clearing my cache fix the STOCKHISTORY non-trading day error?

Unfortunately, no. Because the data originates from Microsoft's remote servers and their market-data providers, local troubleshooting steps like clearing cache or repairing Office will not resolve a backend data feed issue.