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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,702
Members
449,048
Latest member
81jamesacct

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