Forum Discussion
Stockhistory returning #BLOCKED! error
I started getting this error a couple of days ago. Summary of the problem and what Excel Tech Support did but didn't fix the problem.
1. I get #BLOCKED! error with my stockhistory formula but stock data type formula is still working because I can still pull the stock price from Microsoft online repository (Bing)
2. In my local copy of Excel, the group data types has gone missing. I can retrieve it via customising ribbon but the icons for stock, currency, etc. is not there.
3. In the web version of Excel, the data types group is there but I still get the same error as (1)
4. Yesterday, the Microsoft support person reinstalled my copy of Office, checked the privacy settings in "Connected Experiences" but did not fix the problem. They said it was going to be escalated but I didn't get a call back at the agreed time. I went back to Tech Support via chat and the guy said that stockhistory function has been removed from Excel. Clearly clueless.
5. Is this a license problem?
3 Replies
- rndwlkCopper Contributor
Copilot gave conflicting information; in one answer it said Excel 2021 supports it. I tried to make it work, but no success. Finally, I got this answer.
___________________________________________________________________________________________
does STOCKHISTORY function work in Excel 2021 (stand alone) on Windows 10 PC?
No, the STOCKHISTORY function does not work in Excel 2021 standalone on Mac. It requires a Microsoft 365 subscription to function properly.Here’s what you need to know:
❌ STOCKHISTORY in Excel 2021 Standalone (Mac or Windows)
- Function visibility: STOCKHISTORY appears in Excel 2021’s formula library, so you can type it in and see syntax suggestions.
- Functionality blocked: When executed, it typically returns a #BLOCKED! error or a “License Required” message, because it relies on cloud-connected services that are exclusive to Microsoft 365.
- Platform parity: This limitation applies equally to Mac and Windows versions of Excel 2021. The issue is not OS-specific but license-specific.
✅ STOCKHISTORY Works With:
- Microsoft 365 subscription: Fully functional on both Mac and Windows when signed into a Microsoft 365 account.
- Excel for the Web: Also supports STOCKHISTORY if accessed via a Microsoft 365 subscription.
🔄 Why It’s Confusing
- Microsoft included STOCKHISTORY in Excel 2021’s formula set, but did not enable the backend data service for standalone users.
- This has led to frustration among users who assumed the function would work simply because it’s visible.
- AgustínCopper Contributor
To fix this, you should check your privacy settings by going to File > Options > Privacy Settings and ensuring that all Connected Experiences options are enabled. This should restore the function's ability to retrieve stock history data.
Regarding the missing Data Types group in the Excel ribbon, this could be due to an issue with your Office version or customization settings. First, confirm that you're using a Microsoft 365 subscription, as data types and STOCKHISTORY are only available in certain editions. If your subscription is active, try restoring the Data Types group by going to File > Options > Customize Ribbon, selecting Data, and adding a new group if necessary. Sometimes, missing features can be brought back by customizing the ribbon manually.
If the issue persists, it’s a good idea to repair your Office installation. You can do this by navigating to Apps and Features in Windows, selecting your Microsoft Office application, clicking Modify, and choosing Online Repair. Additionally, keeping Excel updated can prevent such issues, so check for updates under File > Account > Update Options > Update Now.
Since you're still able to access stock prices using the stock data type but not STOCKHISTORY, it’s unlikely to be a licensing issue.
- NikolinoDEPlatinum Contributor
The STOCKHISTORY function is exclusive to Microsoft 365 subscribers and isn't available in standalone versions like Excel 2021. Users with perpetual licenses have reported encountering the #BLOCKED! error when attempting to use this function.
If you're connected to a corporate network, firewall or proxy settings might block Excel's access to online data sources, leading to the #BLOCKED! error. Consult your IT department to verify network configurations.
While the STOCKHISTORY function is available in Excel for the Web, ensure you're using a supported browser and that your Microsoft 365 subscription is active.
The disappearance of the Data Types group and related icons suggests a customization or installation issue. Since reinstating the group and reinstalling Office didn't resolve the problem, it might be linked to licensing or network restrictions.
I hope this helps...but if it doesn't, I recommend providing more information about the digital environment. Information like the Excel version, operating system, storage medium (OneDrive, SharePoint, hard drive, etc.).
Otherwise, I wish you the best of luck.