Update on Automating Yahoo Finance Stock History into Excel

fred3

New Member
Joined
May 1, 2011
Messages
39
It has been some time since I used my vba / Workbook setup to do stock analysis. I find that it no longer works.
I've done a bit of research and trying with limited success.
I haven't found much that seems to be *current* information as of 3/22/2023. So, I'm asking for other's views here.
My original Workbook would automatically get Date, Open, High, Low, Close, Adj Close, Volume over 2 or 3years to the last date.
So, I'd like to get the same capability.
The question is how?

Just for refernce to show how old the orignal Worksheet is; the old vba code included the Yahoo access:
VBA Code:
qurl = "http://ichart.finance.yahoo.com/table.csv?s=" & Symbol
        qurl = qurl & "&a=" & Month(StartDate) - 1 & "&b=" & Day(StartDate) & _
            "&c=" & Year(StartDate) & "&d=" & Month(EndDate) - 1 & "&e=" & _
            Day(EndDate) & "&f=" & Year(EndDate) & "&g=" & Sheets("Data").Range("a1") & "&q=q&y=0&z=" & _
            Symbol & "&x=.csv"

So far, the best luck(?) I've had is using Data/From Web and providing the necessary URL.
Just doing this manually goes through PowerQuery and loads only the first 100 rows of a table that is much larger (but not quite large enough if the specified date span is 3.3 years).
So, at least I was able to download over 2 years worth of history but that gets lost in loading into a Worksheet.
Of course, this is all manual and not automated at all. So, it's not what I need but is some kind of progress.

I'm looking for suggestions, references and examples of things that will work in today's context.

Thanks!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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