QueryTable adding new column for Yahoo Finance query ??

dpenny

New Member
Joined
Jan 27, 2005
Messages
29
I'll try this without adding code, I don't have it as I write this.

I picked up Excel VBA to query Yahoo Finance stock prices. I punch the excel button it works fine.
1) wanted to change the VBA to "push down" old results and add new ones
2) didn't like the code & use of cell looping - I know how to modify
3) all of a sudden the "querytable.add......" inserted an extra column into worksheet, of course everything else failed
Q1: any suggestions why
Q2: the help says querytable.add puts a new query into queries collection, are the parameters sort of frozen so I cannot issue a new query
Q3: how can I execute anURL query without adding to the collection, seems very awkward, why can't I just re-execute it
Q4: can I get a query result into a variable rather than a cell or series of cells?

Hmmm, maybe I better post some code.

**** Penny
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I am not sure I have understood. however as far I visulaize the problem

why should you push down old data.
once the current data is donwloaded in sheet1. copy the data to another sheeet (first column stock names) second column-columnn B- the data copied

next time before you refresh data in sheet1. delete or celar the old data(incorporate this in the vba before refresh) and then resfresh. now this data can go into column c using vlookup function. next time it goes into column D etc etc.

so at any time sheet1 will contain the current data. sheet2 is for archival.

thank on these line if this is the problm.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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