I have created a web query in Excel to download "key statistics"for a stock
into my spreadsheet.
The url and query is http://finance.yahoo.com/q/ks?s=PFE
Selection=yfncsumtab,21,24,26,29,32,35,38,41,44
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False
with the ticker being PFE. I want to be able to reference a cell in the
spreadsheet with a ticker so I can easily change the stock I am requesting
data for. Can you tell me how to do that?

Signature
Al Eaton
aleaton@bak.rr.com
sebastienm - 17 Jul 2004 02:26 GMT
Hi,
1. Adding a general Parameter.
-Once you have run the query, right-click a cell in the returned data and choose EditQuery from the pop-up menu.
-There, change the url
http://finance.yahoo.com/q/ks?s=PFE
to
http://finance.yahoo.com/q/ks?s=["Stock1","Enter stock symbol."]
-click OK
- You are now being prompted to enter a stock symbol
Note: if you had saved your query into a qry file, i am not sure it will update the file and you may loose any modification. In that case, rebuild your query without saving it into a qry file.
2. Change the Parameter type.
Now that you have built a general parameter (prompt box), when you right-click the query data, the 'Parameters' submenu in the pop-up menu is enabled.
There, you can change the type of the parameter to be linked to a cell.
I hope this helps,

Signature
Regards,
Sébastien
sebastienm - 17 Jul 2004 02:27 GMT

Signature
Regards,
Sébastien