Excel's STOCKHISTORY function throws #BLOCKED! when you run a perpetual Office license (Office 2019/2021/2024) or lose Microsoft 365 token sync, #BUSY! and #CONNECT! when Microsoft's backend throttles workbooks or suffers an outage, and #VALUE! whenever your date falls on a weekend, market holiday, or mismatched regional format. Instead of burning hours signing out of Office, rewriting fragile IFERROR wrappers, and waiting on Microsoft server patches, serious investors replace STOCKHISTORY with MarketXLS (=QM_GetHistory("AAPL") and =Close_Historical("AAPL", DATE(2026,1,2), "Yes")) for clean, unthrottled historical data across Excel 2016+, Microsoft 365, Mac, and Web.
Try it in your own spreadsheet
Get the free MarketXLS sample workbook (.xlsx).
No account needed. MarketXLS live data requires a paid plan. Preview workbook
Explore more videos
Complete STOCKHISTORY Error Diagnostic Matrix
Here is every common STOCKHISTORY failure, what triggers it, the temporary Microsoft workaround, and why the problem keeps coming back:
| Error / Symptom | Root Technical Cause | Quick Temporary Workaround | Why It Still Breaks Your Workflow |
|---|---|---|---|
#BLOCKED! | Running standalone Office 2019/2021/2024 (not M365), or expired M365 cloud sign-in token | Sign out of File > Account, restart Excel, sign back in; verify active M365 license | Never works on perpetual Office; breaks whenever a colleague opens your file on a non-M365 license |
#BUSY! | Asynchronous query queue bottleneck when a workbook has 50–200+ STOCKHISTORY calls | Reduce ticker count, disable auto-calc, wait minutes for recalc | Scales poorly on real portfolios, multi-asset backtests, or screeners |
#CONNECT! | Microsoft/LSEG backend API gateway outage or rate-limit cutoff | Wait for Microsoft to patch backend servers (no user fix) | Zero SLA; widespread outages hit critical reporting days (quarter-end / New Year) |
#VALUE! | start_date and end_date fall on a weekend/holiday, or DD/MM vs MM/DD locale mismatch | Wrap dates in DATE(YYYY,M,D) and pad start dates by -4 days with INDEX/TAKE | Messy nested formulas just to pull one prior closing price |
#SPILL! | STOCKHISTORY always returns a multi-cell array (at minimum 2 cells unless header/date stripped) | Clear adjacent cells or wrap in INDEX(..., 1, 2) | Breaks cleanly formatted single-cell holdings rows and financial models |
| Missing Data | No adjusted-for-dividends total return, no intraday bars, no option history, no ex-dividend dates | None natively in STOCKHISTORY | Forces manual CSV imports from external sites |
Why There Is No Point Debugging STOCKHISTORY Every Month
Even Microsoft explicitly notes in its documentation that built-in Stocks data types and STOCKHISTORY are provided "as-is" and are not intended for professional trading or financial execution. If your workbook tracks real client money, cost-basis lots, portfolio backtests, or a 100-ticker watchlist, patching #BUSY! queues and weekend #VALUE! crashes is wasted engineering time.
You do not need to keep debugging STOCKHISTORY—you just need a clean, dedicated market-data layer built for Excel.

Clean MarketXLS historical OHLCV table and price chart generated by =QM_GetHistory inside Excel
Clean Drop-In MarketXLS Replacements for STOCKHISTORY
MarketXLS eliminates every STOCKHISTORY limitation—no #BLOCKED! on Office 2016/2019/2021/2024, no #SPILL! collisions on single-date lookups, built-in weekend/holiday fallback, and full adjusted closes, dividends, fundamentals, and options in the same workbook.
1. Single-Cell Historical Close With Automatic Weekend & Holiday Fallback
With STOCKHISTORY, asking for a Saturday or holiday close throws #VALUE! and spills across two cells. With MarketXLS, pass "Yes" as the third argument to automatically return the prior trading day's close in a single cell:
=Close_Historical("AAPL", DATE(2026, 1, 3), "Yes")
=Adjusted_Close_Historical("SPY", DATE(2025, 12, 31), "Yes")
Formula documentation: Close_Historical, Adjusted_Close_Historical
On Mac and Excel for the Web (Microsoft 365 add-in), add the mxls. prefix:
=mxls.Close_Historical("AAPL", DATE(2026, 1, 3), "Yes")
Formula documentation: mxls.Close_Historical
2. Full Multi-Year OHLCV History Table in One Formula
Pull clean Open, High, Low, Close, and Volume history for backtesting, charting, or Python in Excel (=PY()) models without #BUSY! freezes:
=QM_GetHistory("SPY")
Formula documentation: QM_GetHistory
3. Live Quotes, Dividends & Fundamentals Alongside Your History
STOCKHISTORY cannot give you real-time streaming prices, dividend yields, ex-dividend dates, or valuation ratios. MarketXLS puts all of them in the exact same sheet:
=Last("AAPL") ' On-demand stock price (15-min delayed on Standard)
=QM_Stream_Last("AAPL") ' Real-time streaming tick price (Advanced & Business)
=DividendYield("JNJ") ' Trailing dividend yield
=Ex_DividendDate("JNJ") ' Next / latest ex-dividend date
=CAGR("MSFT", 5) ' 5-year compound annual growth rate
=QM_GetOptionChain("SPY") ' Full live option chain
Formula documentation: Last, QM_Stream_Last, DividendYield, Ex_DividendDate, CAGR, QM_GetOptionChain
Quick Side-by-Side Comparison
| Requirement | Excel STOCKHISTORY | MarketXLS |
|---|---|---|
| Works on Office 2016 / 2019 / 2021 / 2024 | No (#BLOCKED!) | Yes (Windows 2016+/M365 + Mac/Web) |
| Built-in weekend/holiday fallback | No (#VALUE!) | Yes ("Yes" 3rd argument) |
Single-cell close without #SPILL! | Needs nested INDEX wrapper | Native single-cell output |
| Real-time streaming quotes | Never | Yes (=QM_Stream_Last on Advanced & Business) |
| Dividends, fundamentals & option chains | Not included | 1,000+ formulas built in |
Ready to stop fixing broken STOCKHISTORY spreadsheets? Explore Historical Stock Data in Excel, see How to Get Live Stock Prices in Excel, or compare plans on MarketXLS Pricing (Standard starts at $70/month billed annually / $850/year; Advanced with real-time streaming is $125/month billed annually / $1,500/year).
Frequently Asked Questions
Why is Excel STOCKHISTORY showing #BLOCKED!?
#BLOCKED! occurs when you open the workbook in a one-time purchase version of Excel (Office 2019, 2021, or 2024) rather than an active Microsoft 365 subscription, or when your Office cloud login token drops sync. MarketXLS works across both perpetual Windows Excel (2016+) and Microsoft 365 on Windows, Mac, and Web.
How do I fix STOCKHISTORY stuck on #BUSY! or #CONNECT!?
#BUSY! and #CONNECT! indicate Microsoft backend throttling (common above 50–150 tickers) or a server-side Refinitiv/Microsoft outage. Signing out/in only clears local token glitches—it cannot fix backend throttling or outages. Switching to MarketXLS (=QM_GetHistory / =Close_Historical) replaces Microsoft's throttled consumer feed with a dedicated licensed API.
Why does STOCKHISTORY return #VALUE! on valid dates?
If your start_date and end_date land on a weekend or exchange holiday, STOCKHISTORY throws #VALUE! ("non trading days"). Text date strings like "09/07/2026" also break across regional DD/MM vs MM/DD settings. MarketXLS solves both cleanly with =Close_Historical("AAPL", DATE(2026,1,3), "Yes"), which automatically returns the prior trading day's close.
Can STOCKHISTORY pull dividend-adjusted closes, ex-dividend dates, or option prices?
No. STOCKHISTORY only outputs basic historical equity price/volume fields and cannot pull ex-dividend dates, dividend payout schedules, or option chains. MarketXLS provides =Adjusted_Close_Historical(), =Ex_DividendDate(), =DividendYield(), and =QM_GetOptionChain() directly in Excel.
What is the best reliable alternative to STOCKHISTORY in Excel?
MarketXLS is the de facto Excel replacement for STOCKHISTORY when you need dependable historical price tables, weekend-safe specific-date closes, real-time streaming quotes, fundamentals, and options data without #BLOCKED! or #BUSY! interruptions.

