12 New Messages
Digest #2477
Messages
Tue Jan 22, 2013 7:09 am (PST) . Posted by:
"Randy Harmelink" rharmelink
I'm not seeing the issues you describe. Maybe they've fixed it? But no, no
parameters -- the add-in just parses out what Yahoo sends. It doesn't check
for data inconsistencies.
As for getting Yahoo data cleaned -- you'd need to contact Yahoo with
issues, if you can see them on the web page. Note the "Send Feedback" link
at the bottom of the web page. I've done it several times in the past for
data issues I've had.
On Tue, Jan 22, 2013 at 7:47 AM, Stephen Williams <
smhwilliams@googlemail.com > wrote:
>
> hi Randy, firstly, thanks for the amazing work. I am having issues
> downloading ohlc data with prices sometimes randomly changing from pence to
> pounds (eg for the blackrock ftse100 etf, ISF.L : Price 578.9 on 10th Oct,
> then 5.78 and similar to 29th Oct, then 581 and 586 on 29 and 30th Oct,
> then back to 5.x for a few days- just wondering if there are any parameters
> and/or alternative functions/sources that might force results into £ or
> pence, and/or any mechanism for getting yahoo data cleaned.
> (excel2010/W7x64). Many thanks
>
parameters -- the add-in just parses out what Yahoo sends. It doesn't check
for data inconsistencies.
As for getting Yahoo data cleaned -- you'd need to contact Yahoo with
issues, if you can see them on the web page. Note the "Send Feedback" link
at the bottom of the web page. I've done it several times in the past for
data issues I've had.
On Tue, Jan 22, 2013 at 7:47 AM, Stephen Williams <
smhwilliams@
>
> hi Randy, firstly, thanks for the amazing work. I am having issues
> downloading ohlc data with prices sometimes randomly changing from pence to
> pounds (eg for the blackrock ftse100 etf, ISF.L : Price 578.9 on 10th Oct,
> then 5.78 and similar to 29th Oct, then 581 and 586 on 29 and 30th Oct,
> then back to 5.x for a few days- just wondering if there are any parameters
> and/or alternative functions/sources that might force results into £ or
> pence, and/or any mechanism for getting yahoo data cleaned.
> (excel2010/W7x64)
>
Tue Jan 22, 2013 1:10 pm (PST) . Posted by:
"Matt" kickbrickley
Hello! Thank you for putting this all together - very awesome. I've spent two days getting accustomed but have a lingering problem:
I want to pull the "Net Cash from Total Operating Activities" data from all four quarters.
The first comes easily with
=RCHGetTableCell("http://www.motleyfool.idmanagedsolutions.com/stocks/cash_flow.idms?SYMBOL_US=AAPL&TIME=QUARTER# ",1,">Net Cash from Total")
How do I pick up the 2nd, 3rd and 4th Quarters?
I thought advancing the Cell# would do the trick but the data seems incorrect.
Thanks in advance,
Matt
I want to pull the "Net Cash from Total Operating Activities" data from all four quarters.
The first comes easily with
=RCHGetTableCell(
How do I pick up the 2nd, 3rd and 4th Quarters?
I thought advancing the Cell# would do the trick but the data seems incorrect.
Thanks in advance,
Matt
Tue Jan 22, 2013 1:23 pm (PST) . Posted by:
"Randy Harmelink" rharmelink
For some reason, when you have the "#" suffix on the URL, it gives you the
annual data instead of the quarterly. Usually, the "#" is a placement
directive, but maybe it thinks you're asking for a TIME of "QUARTER#",
which it doesn't understand, so it gives you the default value of ANNUAL.
So just drop that trailing "#" on the URL and it appears to work fine.
On Tue, Jan 22, 2013 at 1:07 PM, Matt matthewgkirk@gmail.com > wrote:
> Hello! Thank you for putting this all together - very awesome. I've
> spent two days getting accustomed but have a lingering problem:
>
> I want to pull the "Net Cash from Total Operating Activities" data from
> all four quarters.
>
> The first comes easily with
>
> =RCHGetTableCell("
> http://www.motleyfool.idmanagedsolutions.com/stocks/cash_flow.idms?SYMBOL_US=AAPL&TIME=QUARTER# ",1,">Net
> Cash from Total")
>
> How do I pick up the 2nd, 3rd and 4th Quarters?
>
> I thought advancing the Cell# would do the trick but the data seems
> incorrect.
>
annual data instead of the quarterly. Usually, the "#" is a placement
directive, but maybe it thinks you're asking for a TIME of "QUARTER#
which it doesn't understand, so it gives you the default value of ANNUAL.
So just drop that trailing "#" on the URL and it appears to work fine.
On Tue, Jan 22, 2013 at 1:07 PM, Matt matthewgkirk@
> Hello! Thank you for putting this all together - very awesome. I've
> spent two days getting accustomed but have a lingering problem:
>
> I want to pull the "Net Cash from Total Operating Activities" data from
> all four quarters.
>
> The first comes easily with
>
> =RCHGetTableCell(
> http://www.motleyfo
> Cash from Total")
>
> How do I pick up the 2nd, 3rd and 4th Quarters?
>
> I thought advancing the Cell# would do the trick but the data seems
> incorrect.
>
Tue Jan 22, 2013 1:12 pm (PST) . Posted by:
"Cesar Augusto Crivelli" cesarcrivelli
Randy,
Many thanks, worked and I used =right(formula) counting 5 characters, to parse the data. Unfortunately it is retrieving something like 19.39 with . (point) and here we use , (comma), so would be like 19,39. Since Reuters website standard is . I dont beleive is there a way to change it. Any any to fix it instead of changing excel conf?
________________________________
From: Randy Harmelink rharmelink@gmail.com >
To: smf_addin@yahoogroups.com
Sent: Tuesday, January 22, 2013 12:56 PM
Subject: Re: [smf_addin] Re: Reuters: financial data is missing
The data isn't in a table, so RCHGetTableCell() won't get it. Also, they have additional junk in the "span" tag that holds the data, so you'll need to parse the results that come back with something like:
=smfGetTagContent("http://www.reuters.com/finance/stocks/overview?symbol=PETR4.SA ","span",1,">Prev Close")
On Tue, Jan 22, 2013 at 5:18 AM, cesarcrivelli cesarcrivelli@yahoo.com > wrote:
>Leveraging from this topic, I am trying to get the Close, Open, High, Low, Vol, Avg Vol, 52 wk high, 52 wk low, from Reuters, trough the following address
>
>http://www.reuters.com/finance/stocks/overview?symbol=PETR4.SA
>
>I am using this formula
>
>=RCHGetTableCell("http://www.reuters.com/finance/stocks/overview?symbol=PETR4.SA ";1;"overview";"Prev Close")
>
>But instead of getting the close price I receive "beta:"
>
>Any help?
>
Many thanks, worked and I used =right(formula) counting 5 characters, to parse the data. Unfortunately it is retrieving something like 19.39 with . (point) and here we use , (comma), so would be like 19,39. Since Reuters website standard is . I dont beleive is there a way to change it. Any any to fix it instead of changing excel conf?
____________
From: Randy Harmelink rharmelink@gmail.
To: smf_addin@yahoogrou
Sent: Tuesday, January 22, 2013 12:56 PM
Subject: Re: [smf_addin] Re: Reuters: financial data is missing
The data isn't in a table, so RCHGetTableCell(
=smfGetTagContent(
On Tue, Jan 22, 2013 at 5:18 AM, cesarcrivelli cesarcrivelli@
>Leveraging from this topic, I am trying to get the Close, Open, High, Low, Vol, Avg Vol, 52 wk high, 52 wk low, from Reuters, trough the following address
>
>http://www.reuters.
>
>I am using this formula
>
>=RCHGetTableCel
>
>But instead of getting the close price I receive "beta:"
>
>Any help?
>
Tue Jan 22, 2013 1:14 pm (PST) . Posted by:
"Randy Harmelink" rharmelink
Not without custom programming. Everything I do is based on the U.S.
Regional Settings, both for the operating system and EXCEL.
On Tue, Jan 22, 2013 at 2:12 PM, Cesar Augusto Crivelli <
cesarcrivelli@yahoo.com > wrote:
>
> Many thanks, worked and I used =right(formula) counting 5 characters, to
> parse the data. Unfortunately it is retrieving something like 19.39 with .
> (point) and here we use , (comma), so would be like 19,39. Since Reuters
> website standard is . I dont beleive is there a way to change it. Any any
> to fix it instead of changing excel conf?
>
Regional Settings, both for the operating system and EXCEL.
On Tue, Jan 22, 2013 at 2:12 PM, Cesar Augusto Crivelli <
cesarcrivelli@
>
> Many thanks, worked and I used =right(formula) counting 5 characters, to
> parse the data. Unfortunately it is retrieving something like 19.39 with .
> (point) and here we use , (comma), so would be like 19,39. Since Reuters
> website standard is . I dont beleive is there a way to change it. Any any
> to fix it instead of changing excel conf?
>
Tue Jan 22, 2013 2:45 pm (PST) . Posted by:
"cesarcrivelli" cesarcrivelli
Randy,
Sorry to bother with so many questions... but the spreadsheet its almost done...
4-Traders provide a table that contains estimates up to 2016, which can be acessed by this link
http://www.4-traders.com/PETROLEO-BRASILEIRO-PETRO-6496795/calendar/
Note that to get into 2016 you need to click several times in the "Next Year" link
I would like to retreive all the estimates 2012 - 2016 - for Sales, EBITDA, EBIT, NET INCOME, EPS
First I tried to use GetTableCell, but it did not work... then I tried SmfGetTagContent, but when I looked to html code to find any specification referring to the field I want, for exemple, Sales 2015, It wasnt in the code...
Any thoughts?
Sorry to bother with so many questions... but the spreadsheet its almost done...
4-Traders provide a table that contains estimates up to 2016, which can be acessed by this link
http://www.4-
Note that to get into 2016 you need to click several times in the "Next Year" link
I would like to retreive all the estimates 2012 - 2016 - for Sales, EBITDA, EBIT, NET INCOME, EPS
First I tried to use GetTableCell, but it did not work... then I tried SmfGetTagContent, but when I looked to html code to find any specification referring to the field I want, for exemple, Sales 2015, It wasnt in the code...
Any thoughts?
Tue Jan 22, 2013 2:53 pm (PST) . Posted by:
"Randy Harmelink" rharmelink
The tables are dynamically displayed for later years, so there's nothing on
that web page to extract for 2015. However, it appears the raw data is here:
http://www.4-traders.com/mods_a/reuters/TableYears.php?&RepNo=A582A&CurrentYear=2015
On Tue, Jan 22, 2013 at 3:45 PM, cesarcrivelli cesarcrivelli@yahoo.com >wrote:
>
> 4-Traders provide a table that contains estimates up to 2016, which can be
> acessed by this link
>
> http://www.4-traders.com/PETROLEO-BRASILEIRO-PETRO-6496795/calendar/
>
> Note that to get into 2016 you need to click several times in the "Next
> Year" link
>
> I would like to retreive all the estimates 2012 - 2016 - for Sales,
> EBITDA, EBIT, NET INCOME, EPS
>
> First I tried to use GetTableCell, but it did not work... then I tried
> SmfGetTagContent, but when I looked to html code to find any specification
> referring to the field I want, for exemple, Sales 2015, It wasnt in the
> code...
>
> Any thoughts?
>
that web page to extract for 2015. However, it appears the raw data is here:
http://www.4-
On Tue, Jan 22, 2013 at 3:45 PM, cesarcrivelli cesarcrivelli@
>
> 4-Traders provide a table that contains estimates up to 2016, which can be
> acessed by this link
>
> http://www.4-
>
> Note that to get into 2016 you need to click several times in the "Next
> Year" link
>
> I would like to retreive all the estimates 2012 - 2016 - for Sales,
> EBITDA, EBIT, NET INCOME, EPS
>
> First I tried to use GetTableCell, but it did not work... then I tried
> SmfGetTagContent, but when I looked to html code to find any specification
> referring to the field I want, for exemple, Sales 2015, It wasnt in the
> code...
>
> Any thoughts?
>
Tue Jan 22, 2013 4:39 pm (PST) . Posted by:
"cesarcrivelli" cesarcrivelli
Ow, amazing!
You got it from html code, at this.RepNo right?
So, as I need to get this same table for almost 100 stocks, I must enter in each html table and discover the correspondent code for each ticker? By your knolege and experience, do you think this code is randon and will change? Any faster way to get this for the other tickers?
Tks!
Cesar
--- In smf_addin@yahoogroups.com , Randy Harmelink wrote:
>
> The tables are dynamically displayed for later years, so there's nothing on
> that web page to extract for 2015. However, it appears the raw data is here:
>
> http://www.4-traders.com/mods_a/reuters/TableYears.php?&RepNo=A582A&CurrentYear=2015
>
> On Tue, Jan 22, 2013 at 3:45 PM, cesarcrivelli wrote:
>
> >
> > 4-Traders provide a table that contains estimates up to 2016, which can be
> > acessed by this link
> >
> > http://www.4-traders.com/PETROLEO-BRASILEIRO-PETRO-6496795/calendar/
> >
> > Note that to get into 2016 you need to click several times in the "Next
> > Year" link
> >
> > I would like to retreive all the estimates 2012 - 2016 - for Sales,
> > EBITDA, EBIT, NET INCOME, EPS
> >
> > First I tried to use GetTableCell, but it did not work... then I tried
> > SmfGetTagContent, but when I looked to html code to find any specification
> > referring to the field I want, for exemple, Sales 2015, It wasnt in the
> > code...
> >
> > Any thoughts?
> >
>
You got it from html code, at this.RepNo right?
So, as I need to get this same table for almost 100 stocks, I must enter in each html table and discover the correspondent code for each ticker? By your knolege and experience, do you think this code is randon and will change? Any faster way to get this for the other tickers?
Tks!
Cesar
--- In smf_addin@yahoogrou
>
> The tables are dynamically displayed for later years, so there's nothing on
> that web page to extract for 2015. However, it appears the raw data is here:
>
> http://www.4-
>
> On Tue, Jan 22, 2013 at 3:45 PM, cesarcrivelli wrote:
>
> >
> > 4-Traders provide a table that contains estimates up to 2016, which can be
> > acessed by this link
> >
> > http://www.4-
> >
> > Note that to get into 2016 you need to click several times in the "Next
> > Year" link
> >
> > I would like to retreive all the estimates 2012 - 2016 - for Sales,
> > EBITDA, EBIT, NET INCOME, EPS
> >
> > First I tried to use GetTableCell, but it did not work... then I tried
> > SmfGetTagContent, but when I looked to html code to find any specification
> > referring to the field I want, for exemple, Sales 2015, It wasnt in the
> > code...
> >
> > Any thoughts?
> >
>
Tue Jan 22, 2013 5:17 pm (PST) . Posted by:
"Randy Harmelink" rharmelink
I think you can extract the RepNo from the HTML code of the original web
page:
=smfStrExtr(RCHGetWebData("
http://www.4-traders.com/PETROLEO-BRASILEIRO-PETRO-6496795/calendar/
","RepNo"),"""","""")
On Tue, Jan 22, 2013 at 5:39 PM, cesarcrivelli cesarcrivelli@yahoo.com >wrote:
> Ow, amazing!
>
> You got it from html code, at this.RepNo right?
>
> So, as I need to get this same table for almost 100 stocks, I must enter
> in each html table and discover the correspondent code for each ticker? By
> your knolege and experience, do you think this code is randon and will
> change? Any faster way to get this for the other tickers?
>
> Tks!
>
page:
=smfStrExtr(
http://www.4-
","
On Tue, Jan 22, 2013 at 5:39 PM, cesarcrivelli cesarcrivelli@
> Ow, amazing!
>
> You got it from html code, at this.RepNo right?
>
> So, as I need to get this same table for almost 100 stocks, I must enter
> in each html table and discover the correspondent code for each ticker? By
> your knolege and experience, do you think this code is randon and will
> change? Any faster way to get this for the other tickers?
>
> Tks!
>
Wed Jan 23, 2013 12:59 am (PST) . Posted by:
"andrewhills97" andrewhills97
There are many useful MS Excel files which show us how to retrieve major financial and valuation data for US listed companies. Is it possible to retrieve similiar data for European and Asian equities? apart from those companies which are dual listed.
Wed Jan 23, 2013 1:23 am (PST) . Posted by:
"Randy Harmelink" rharmelink
I'll leave that up to others, since I do nothing with non-U.S. companies.
On Wed, Jan 23, 2013 at 1:59 AM, andrewhills97 andrewhills97@yahoo.com >wrote:
> There are many useful MS Excel files which show us how to retrieve major
> financial and valuation data for US listed companies. Is it possible to
> retrieve similiar data for European and Asian equities? apart from those
> companies which are dual listed.
>
On Wed, Jan 23, 2013 at 1:59 AM, andrewhills97 andrewhills97@
> There are many useful MS Excel files which show us how to retrieve major
> financial and valuation data for US listed companies. Is it possible to
> retrieve similiar data for European and Asian equities? apart from those
> companies which are dual listed.
>
Wed Jan 23, 2013 4:04 am (PST) . Posted by:
"bozo" calhandon
Howdy Lee,
Thank you for your suggestion and for sharing your code. However, since the
Yahoo date is being returned in an array-entered range of cells, that means
I would need to create a post-SMF-calculation macro, which I'd rather not
do. It's easy enough for me to just copy and paste the code I added to any
new versions that Randy releases.
Thanks again, Lee.
-Don
From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com ] On Behalf
Of lfranzen_1999
Sent: Tuesday, January 22, 2013 5:56 AM
To: smf_addin@yahoogroups.com
Subject: [smf_addin] Re: Ex-Dividend Dates with RCHGetYahooQuotes
Don -
Your way is probably more elegant, but another way to get around this issue
in excel is by parsing the text string. Below is some example code from an
excel macro I wrote where I parse dates from a site that I scrape for date
data (sometimes yahoo's data is a little behind), you can just cut the
parsing section from the code below, and modify it to meet your needs.
Lee
Sub parsedivinvfiles()
'This macro parses dates from files scraped from dividend site
'into a form that excel can understand as a date
Dim monthtext As String
Dim daytext As String
Dim yeartext As String
Dim celltext As String
Dim exdatestring As String
Dim paydatestring As String
Dim historyfiledirectory As String
Windows("Dividend Stock List.xls").Activate
Sheets("Constants").Select
Range("A1").Select
Do Until ActiveCell.Value = "divhistoryfiles"
ActiveCell.Offset(1, 0).Select
Loop
historyfiledirectory = ActiveCell.Offset(0, 1).Value
exdatestring = "Dividend Ex Date"
paydatestring = "Dividend Pay Date"
MyFile = Dir(historyfiledirectory & "*.csv")
Do Until MyFile = ""
Workbooks.Open (historyfiledirectory) & MyFile
Range("A1").Name = "startofrownames"
Range("A1").End(xlDown).Name = "endofrownames"
'If WorksheetFunction.CountIf(Range("startofrownames:endofrownames"),
exdatestring) > 0 Then
Range("startofrownames:endofrownames").Select
Selection.Find(What:=exdatestring, after:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Select
celltext = ActiveCell.Value
monthtext = Left(celltext, 4)
yeartext = Right(celltext, 5)
daytext = Mid(celltext, 5, 3)
ActiveCell.Value = daytext & monthtext & yeartext
'End If
'If WorksheetFunction.CountIf(Range("startofrownames:endofrownames"),
paydatestring) > 0 Then
Range("startofrownames:endofrownames").Select
Selection.Find(What:=paydatestring, after:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Select
celltext = ActiveCell.Value
monthtext = Left(celltext, 4)
yeartext = Right(celltext, 5)
daytext = Mid(celltext, 5, 3)
ActiveCell.Value = daytext & monthtext & yeartext
'End If
ActiveWorkbook.Close savechanges:=True
MyFile = Dir
Loop
End Sub
--- In smf_addin@yahoogroups.com ,
"calhandon" wrote:
>
> Howdy Randy,
>
> Regarding my message about Ex-Dividend Dates with RCHGetYahooQuotes, I
> took a look at your modGetYahooQuotes function and made a 3-line
> addition, denoted by a comment below. All this does is convert the
> returned value from Yahoo to a serial date, if the value is a valid
> date. Please feel free to add it permanently if you would like to.
>
> Thanks for all of your time and effort spent on this great project!
>
> -Don
>
> --- start code ---
>
> '------------------> Parse returned data
> 'sqData = Replace(sqData, Chr(10), Chr(13))
> 'sqData = Replace(sqData, Chr(13) & Chr(13), Chr(13))
> 'sqData = Replace(sqData, Chr(13) & Chr(13), Chr(13))
> sqData = Replace(sqData, vbCrLf, vbLf)
> aqData = Split(sqData, vbLf)
> iDim1 = UBound(aqData, 1)
> If iDim1 > kDim1 Then iDim1 = kDim1
> For i1 = 0 To iDim1 - 1
> iPos1 = 1
> For i2 = 0 To 200
> If i2 + 1 > kDim2 Then Exit For
> If iPos1 > Len(aqData(i1)) Then Exit For
> sFind = IIf(Mid(aqData(i1), iPos1, 1) = Chr(34), Chr(34),
> "") & sDel
> iPos2 = InStr(iPos1, aqData(i1) & sDel, sFind)
> s1 = Left(Mid(aqData(i1), iPos1 + Len(sFind) - 1, iPos2 -
> iPos1 - Len(sFind) + 1), 255)
> s2 = Trim(s1)
> If Right(s2, 1) = "%" Then
> n1 = 100
> s2 = Left(s2, Len(s2) - 1)
> Else
> n1 = 1
> End If
> On Error Resume Next
> s1 = smfConvertData(s2) / n1
> On Error GoTo ErrorExit
>
> ' If this is an Ex-Dividend Date, convert it to DateSerial
> format ...
> If ((Mid(sItems, i2 + 1, 1) = "q") And (IsDate(s1))) Then
> s1 = CDate(s1)
> End If
>
> vData(i1 + 1 + pHeader, i2 + 1) = s1
> iPos1 = iPos2 + Len(sFind)
> Next i2
> Next i1
>
>
> --- end code ---
>
Thank you for your suggestion and for sharing your code. However, since the
Yahoo date is being returned in an array-entered range of cells, that means
I would need to create a post-SMF-calculatio
do. It's easy enough for me to just copy and paste the code I added to any
new versions that Randy releases.
Thanks again, Lee.
-Don
From: smf_addin@yahoogrou
Of lfranzen_1999
Sent: Tuesday, January 22, 2013 5:56 AM
To: smf_addin@yahoogrou
Subject: [smf_addin] Re: Ex-Dividend Dates with RCHGetYahooQuotes
Don -
Your way is probably more elegant, but another way to get around this issue
in excel is by parsing the text string. Below is some example code from an
excel macro I wrote where I parse dates from a site that I scrape for date
data (sometimes yahoo's data is a little behind), you can just cut the
parsing section from the code below, and modify it to meet your needs.
Lee
Sub parsedivinvfiles(
'This macro parses dates from files scraped from dividend site
'into a form that excel can understand as a date
Dim monthtext As String
Dim daytext As String
Dim yeartext As String
Dim celltext As String
Dim exdatestring As String
Dim paydatestring As String
Dim historyfiledirector
Windows("
Sheets("
Range("
Do Until ActiveCell.Value = "divhistoryfil
ActiveCell.Offset(
Loop
historyfiledirector
exdatestring = "Dividend Ex Date"
paydatestring = "Dividend Pay Date"
MyFile = Dir(historyfiledire
Do Until MyFile = ""
Workbooks.Open (historyfiledirecto
Range("
Range("
'If WorksheetFunction.
exdatestring) > 0 Then
Range("
Selection.Find(
, LookAt:=xlPart, SearchOrder:
MatchCase:=False, SearchFormat:
ActiveCell.Offset(
celltext = ActiveCell.Value
monthtext = Left(celltext, 4)
yeartext = Right(celltext, 5)
daytext = Mid(celltext, 5, 3)
ActiveCell.Value = daytext & monthtext & yeartext
'End If
'If WorksheetFunction.
paydatestring) > 0 Then
Range("
Selection.Find(
, LookAt:=xlPart, SearchOrder:
MatchCase:=False, SearchFormat:
ActiveCell.Offset(
celltext = ActiveCell.Value
monthtext = Left(celltext, 4)
yeartext = Right(celltext, 5)
daytext = Mid(celltext, 5, 3)
ActiveCell.Value = daytext & monthtext & yeartext
'End If
ActiveWorkbook.
MyFile = Dir
Loop
End Sub
--- In smf_addin@yahoogrou
"calhandon&quo
>
> Howdy Randy,
>
> Regarding my message about Ex-Dividend Dates with RCHGetYahooQuotes, I
> took a look at your modGetYahooQuotes function and made a 3-line
> addition, denoted by a comment below. All this does is convert the
> returned value from Yahoo to a serial date, if the value is a valid
> date. Please feel free to add it permanently if you would like to.
>
> Thanks for all of your time and effort spent on this great project!
>
> -Don
>
> --- start code ---
>
> '-------
> 'sqData = Replace(sqData, Chr(10), Chr(13))
> 'sqData = Replace(sqData, Chr(13) & Chr(13), Chr(13))
> 'sqData = Replace(sqData, Chr(13) & Chr(13), Chr(13))
> sqData = Replace(sqData, vbCrLf, vbLf)
> aqData = Split(sqData, vbLf)
> iDim1 = UBound(aqData, 1)
> If iDim1 > kDim1 Then iDim1 = kDim1
> For i1 = 0 To iDim1 - 1
> iPos1 = 1
> For i2 = 0 To 200
> If i2 + 1 > kDim2 Then Exit For
> If iPos1 > Len(aqData(i1)
> sFind = IIf(Mid(aqData(
> ""
> iPos2 = InStr(iPos1, aqData(i1) & sDel, sFind)
> s1 = Left(Mid(aqData(
> iPos1 - Len(sFind) + 1), 255)
> s2 = Trim(s1)
> If Right(s2, 1) = "%" Then
> n1 = 100
> s2 = Left(s2, Len(s2) - 1)
> Else
> n1 = 1
> End If
> On Error Resume Next
> s1 = smfConvertData(
> On Error GoTo ErrorExit
>
> ' If this is an Ex-Dividend Date, convert it to DateSerial
> format ...
> If ((Mid(sItems, i2 + 1, 1) = "q"
> s1 = CDate(s1)
> End If
>
> vData(i1 + 1 + pHeader, i2 + 1) = s1
> iPos1 = iPos2 + Len(sFind)
> Next i2
> Next i1
>
>
> --- end code ---
>
Tidak ada komentar:
Posting Komentar