I tried the website you provided with an f "https://finance.yahoo.com/lookup?s=f" and I got returned a different website "https://finance.yahoo.com/lookup/all?s=f". I don't know if this is the problem with what you are experiencing.
The cookie or .responseText
part of the website I can't answer that, but there are other option is to use something different than vba. I have used excel's Power query to do the same thing. examples:
- bitcoin
- investing website
Let's say that you want the table that is at the top left of the website https://finance.yahoo.com/quote/F/ after following the steps in the example and selecting Table 0
I get.
Column1 |
Column2 |
Previous Close |
12.44 |
Open |
12.88 |
Bid |
13.69 x 21500 |
Ask |
13.69 x 800 |
Day's Range |
12.88 - 13.63 |
52 Week Range |
11.79 - 25.87 |
Volume |
77,962,613 |
Avg. Volume |
73,243,411 |
If I pick Table 1
I get the one to the right. If you are wanting every other hour auto refresh rate that can be done see example 1. The problem is that this tool is not the fastest. I decided that the answer was not complete enough so the below part has been redone. I hope that you like the changes to the answer and it gets upvoted and checked as the solution. I hope that the power query part becomes part of your solution for other projects. Steps
- Build a table like below I named mine "tickers".
- Click on From Table/Range

- power query opens up and you will see a one column table in there same as what is in excel. Next expand the queries on the left it then right click > New Query> Other Sources> Blank Query. I renamed this Query1 to
f_stock
. We have to reuse this f_stock
name later.
4. Now click on Advanced Editor
and paste in the below code.
// f_stock
let
Source = (ticker) => let
Source = Web.Page(Web.Contents("https://finance.yahoo.com/quote/" & ticker & "/")),
#"Filtered Rows" = Table.SelectRows(Source, each ([ClassName] <> null)),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Data"}),
Expanded_Data = Table.ExpandTableColumn(#"Removed Other Columns", "Data", {"Column1", "Column2"}, {"Column1", "Column2"})
in
Expanded_Data
in
Source
Save the above then switch back to "tickers". Now click on "Custom Column". I change the column name to "Stats". In the formula box type in the code f_stock([Tickers])
. Click Okay. You will probable get two info warnings popups here. "Information is required about data privacy. Continue
" click " □ Ignore... Save
". The other one I forgot what I clicked.

Your new column comes with the tables expand it by clicking on the button at the top of the column.

Click on Home>Close & load.