ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Function: New Web Query (https://www.excelbanter.com/links-linking-excel/33199-function-new-web-query.html)

vinrouge

Function: New Web Query
 

Function: under Data - Get External Data - New Web Query

good day friends,

i would like to query the stock quote copy to the data to the spread
sheet
by using the function "New Web Query" and link to the web page:
http://finance.yahoo.com/q?s=msft
msft = stock code,

my question is: how can i make the stock code be a variable, or is it
possible to prepare a stock code list to retrieve the data to spread
sheet?

thanks for your help


--
vinrouge

David McRitchie

There are some extra words here
i would like to query the stock quote copy to the data to the spread
sheet

But to simply link to something specified in another cell, which I
suspect is less than you wanted.
A1: msft
B1: =HYPERLINK("http://finance.yahoo.com/q?s=" & trim(a1),"quote")

You can record a macro and change the code so that the stock symbol
is indicated by accessing another cell or from a msgbox.

On my stocks.htm page you will find a link to a page of Chip Pearson's
for a query. You will probably have to change the coding to match the
data. But when I recorded a macro I limited it to tables so the code
may not need much adjustment if that is what was done. Generally
such things are very touchy depending on more data, less data, more
advertising, or even deliberate changes to thwart such applications.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"vinrouge" wrote in message ...

Function: under Data - Get External Data - New Web Query

good day friends,

i would like to query the stock quote copy to the data to the spread
sheet
by using the function "New Web Query" and link to the web page:
http://finance.yahoo.com/q?s=msft
msft = stock code,

my question is: how can i make the stock code be a variable, or is it
possible to prepare a stock code list to retrieve the data to spread
sheet?

thanks for your help


--
vinrouge




David McRitchie

You might also try this web search in Google
excel stock* web.query moneycentral

Not that moneycentral.msn.com is better than finance.yahoo.com but
they have an interest in Excel usage working and might be less prone
to making changes in the layout, since there are example there and
in the Microsoft Knowledge Base. .




All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com