How to Fix Excel STOCKHISTORY Invalid Error for Today's Date
Question details
The user encounters an invalid error when using the STOCKHISTORY function in Excel to retrieve today's stock data after the market closes.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attempting to pull the current day's closing stock price using the STOCKHISTORY function immediately after market hours.
- Observed behavior
- The function returns an invalid error for today's date, despite the previous date successfully returning today's closing price.
Verify that your computer's system time and time zone settings are correct, and ensure you have an active internet connection to retrieve external financial data.
Account for Time Zone Differences and Refinitiv Data Delays
The error is often caused by delays in the financial data service (Refinitiv) or time zone disparities between your local machine and the data server.
Excel's stock information is not generated by Microsoft directly but is retrieved from Refinitiv's database. Depending on the time zone of the exchange and Refinitiv's server locations, today's closing data might not be instantly available right after the market closes.
Go to your computer's Date & Time settings and ensure your local time zone matches your actual physical location.
Visit Microsoft's official support page on 'About the Stocks financial data sources' to understand expected provider delays and update schedules.
If the data timing issue persists for specific stocks for prolonged periods, reach out to Refinitiv's support team directly regarding data retrieval delays.
Use a Formula Workaround for the Latest Available Date
Adjust your STOCKHISTORY formula to automatically pull the last working day instead of today's date to prevent invalid errors.
Experience a Faster, Highly Compatible Spreadsheet Tool with WPS Office
If you frequently encounter frustrating function errors, limitations, or heavy subscription fees in Microsoft Excel, consider switching to WPS Office. It provides a lightweight, highly compatible spreadsheet environment that handles complex data and formulas seamlessly.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Open your Excel files: Launch WPS Spreadsheets, click on 'File', and select 'Open' to load your existing .xlsx workbooks.
- 3. Edit seamlessly: Continue working on your financial data and formulas exactly as you would in Microsoft Excel.

Frequently Asked Questions
Why does STOCKHISTORY return a #VALUE! error?
A #VALUE! error in STOCKHISTORY usually occurs if the stock ticker symbol is misspelled, the requested date falls on a weekend or market holiday, or the dates are formatted improperly in the formula.
How often does Excel update its stock data?
Excel retrieves stock data from Refinitiv. While current prices may have a slight delay (typically 15-20 minutes depending on the exchange), historical data (closing prices) is updated after the market closes, though time zone differences can cause synchronization delays.
Can I use STOCKHISTORY without a Microsoft 365 subscription?
No, the STOCKHISTORY function and linked financial data types are premium features currently only available to Microsoft 365 subscribers.




