Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to automatically download info from yahoo finance into excel

I want to have excel automatically go out and download information
from yahoo finance on a daily basis. I'm an excel user with no
programing experience. Is there a kb article or other source of
detailed instruction on how to achieve this goal.

Thanks for you help.
pm.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default how to automatically download info from yahoo finance into excel

Hi Pete,
Below is the macro :
Sub GetYQuotes()
Base01 = "http://finance.yahoo.com/d/quotes.csv?s="
Base02 = "&f=sl1d1t1c1ohgv&e=.csv"
sURL = ""
SymString = ""

LastRow = Cells(65536, 1).End(xlUp).Row

For i = 1 To LastRow
SymString = SymString & Cells(i, 1) & " "
Next i
sURL = Base01 & SymString & Base02
Workbooks.Open sURL
Set rngSource = Cells(1).CurrentRegion
x = rngSource.Rows.Count
y = rngSource.Columns.Count
With ThisWorkbook.Sheets(1)
Set rngDest = Range(.Cells(1, 1), .Cells(x, y))
End With
rngDest.Value = rngSource.Value
ActiveWorkbook.Close SaveChanges:=False
End Sub

You have to arrange your worksheet with no titles in row 1 and using
column A to type in your symbols
ORCL for Oracle, GE for General Electric ...

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to automatically download info from yahoo finance into excel


Hi Pete,
Below is the macro :
Sub GetYQuotes()
Base01 = "http://finance.yahoo.com/d/quotes.csv?s="
Base02 = "&f=sl1d1t1c1ohgv&e=.csv"
sURL = ""
SymString = ""

LastRow = Cells(65536, 1).End(xlUp).Row


For i = 1 To LastRow
SymString = SymString & Cells(i, 1) & " "
Next i
sURL = Base01 & SymString & Base02
Workbooks.Open sURL
Set rngSource = Cells(1).CurrentRegion
x = rngSource.Rows.Count
y = rngSource.Columns.Count
With ThisWorkbook.Sheets(1)
Set rngDest = Range(.Cells(1, 1), .Cells(x, y))
End With
rngDest.Value = rngSource.Value
ActiveWorkbook.Close SaveChanges:=False
End Sub


You have to arrange your worksheet with no titles in row 1 and using
column A to type in your symbols
ORCL for Oracle, GE for General Electric ...


HTH
Cheers
Carim


--
Carim
------------------------------------------------------------------------
Carim's Profile: http://www.excelforum.com/member.php...o&userid=33259
View this thread: http://www.excelforum.com/showthread...hreadid=532999

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel web query does not import table (from yahoo finance) correct Jerome Excel Discussion (Misc queries) 1 April 19th 09 01:21 PM
Web queries & Yahoo! Finance cwhaley Excel Discussion (Misc queries) 1 February 2nd 06 12:31 AM
Sort CSV file from Yahoo Finance Query Jon Excel Programming 1 October 7th 05 07:16 AM
Historical Stock Quotes - Yahoo Finance Jason Excel Programming 4 July 4th 05 12:40 AM
vba yahoo! finance Arun Ram Kumaran Excel Programming 1 July 25th 03 01:04 AM


All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"