webQuery with stock quotes: single cell, not multiple cells

R

Ron Vleugel

Hi,

Via Yahoo I am trying to get stock quotes into my Excel worksheet:
So via goto A1, select Data->Get External Data->New Web Query
and use e.g.
http://finance.yahoo.com/d/quotes.csv?s=EBAY&f=sl

The result is
A1==EBAY,82.70,"1/27/2005","4:00pm",+0.38,82.64,83.75,81.68,17412500


Now, I expected that the above line can easily be positioned into different
cells. Unfortunatelly I don't know how to do this. So I would like to have
the above output like:
A1 == EBAY B1==82.70 C1==1/27/2005 etc

Does anybody know how to do this?

I appreciate your help.

Ron
 
D

Don Guillett

I just recorded this text to columns. Afterwards you would want to resize
your columns.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 1/27/2005 by Don Guillett
'

'
Columns("C:C").Select
Selection.TextToColumns Destination:=Range("C1"), DataType:=xlDelimited,
_
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo
_
:=Array(1, 1), TrailingMinusNumbers:=True
End Sub
 
R

Ron Vleugel

Hi Don,

With the below Macro1, I get "Syntax Error" below the Columns("C;C").Select
line

Did the copy go wrong?

Ron
 
R

Ron Vleugel

Hoh Don!

I figured it out. The error was caused by "TrailingMinusNumbers:=True"
Probably something not supported in my version (2000)

Thanks anyway, it works great!

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top