STOCKHISTORY - issue with range of dates available

StuLux

Well-known Member
Joined
Sep 14, 2005
Messages
679
Office Version
  1. 365
Platform
  1. Windows
I'm using the STOCKHISTORY function to gather monthly/daily stock prices but can't always seem to get a date range going back as far as I would like.
As an example,
Excel Formula:
=SORT(STOCKHISTORY("XLON:LLOY",A6,B6,2),1,-1)
with a start date of 01/01/1980 in cell A6 and "=TODAY()" in cell B6 will give me monthly stock prices for Lloyds Banking Group going back to September 1987 but when I try to get the same range for daily prices using
Excel Formula:
=SORT(STOCKHISTORY("XLON:LLOY",A6,B6,0),1,-1)
it only goes back as far as April 2020.
What I do notice is that there are 411 values returned for both so am I to presume that there is a limit of 411 returned values regardless of date range. If so I wonder why 411, it seems a random starange number?

EDIT - Strangely if I do the same with another stock - say Barclays Bank, I can get 462 values so there seems to be soem dependency on the individual stock - weird?
 
Last edited:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I put the daily formula STOCKHISTORY("XLON:LLOY",A6,B6,0) into Excel and it reported 8674 dates starting at 4/2/1987.

The monthly formula STOCKHISTORY("XLON:LLOY",A6,B6,2) reported 416 dates beginning 4/1/1987.
 
Upvote 0
I put the daily formula STOCKHISTORY("XLON:LLOY",A6,B6,0) into Excel and it reported 8674 dates starting at 4/2/1987.

The monthly formula STOCKHISTORY("XLON:LLOY",A6,B6,2) reported 416 dates beginning 4/1/1987.
Thank you, I tried re-entering the formulae on a new sheet and the problem cleared itself, put it down to one of those many Excel oddities.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,387
Messages
6,119,208
Members
448,874
Latest member
Lancelots

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top