Minggu, 27 Januari 2013

[smf_addin] Digest Number 2482

5 New Messages

Digest #2482
1a
Getting Started by "freefaller6" freefaller6
1b
Re: Getting Started by "Randy Harmelink" rharmelink
2b
Re: Ex-Dividend Dates with RCHGetYahooQuotes by "Randy Harmelink" rharmelink
3a
Re: RCHGetElementNumber Formula errors by "Rosendo Manuel" rosendojose

Messages

Sat Jan 26, 2013 5:35 pm (PST) . Posted by:

"freefaller6" freefaller6

I could use a hand if you have a minute. I am no slouch with Excel, so I am scratching my head as to why I cannot get this to work. I installed the add-in (one thing to note: Excel did seem to get hung up afterward), and entered in A1 symbol, B1 derivative, A2 jnj, B2, the formula as described in the tutorial, =RCHGetElementNumber(A2, 63). Instead of a number, I get NA. I am running MSOffice 2010, macros, an VBA are enabled. Any idea what is going on here?? This is probably a simple fix, but driving me nuts. Thanks.
Brent

Sat Jan 26, 2013 5:41 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

"NA" is what MSN is posting for the 5-year annual average of dividends for
JNJ:

http://investing.money.msn.com/investments/stock-report?CR=1&AF=1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=JNJ

So the add-in is working correctly. Why MSN can't compute the value is
beyond me.

On Sat, Jan 26, 2013 at 6:30 PM, freefaller6 freefaller6@yahoo.com> wrote:

> I could use a hand if you have a minute. I am no slouch with Excel, so I
> am scratching my head as to why I cannot get this to work. I installed the
> add-in (one thing to note: Excel did seem to get hung up afterward), and
> entered in A1 symbol, B1 derivative, A2 jnj, B2, the formula as described
> in the tutorial, =RCHGetElementNumber(A2, 63). Instead of a number, I get
> NA. I am running MSOffice 2010, macros, an VBA are enabled. Any idea what
> is going on here?? This is probably a simple fix, but driving me nuts.
>

Sat Jan 26, 2013 8:26 pm (PST) . Posted by:

"calhandon" calhandon


Hi Randy,

Just wondering if you saw the post below?

Is there a better way to offer suggested enhancements to you, or do you
prefer to not receive enhancements?

Do you have a bunch of different static data that you use for testing
changes to the SMF add-in?

Thank you, Randy.

-Don

=============================================================
--- In smf_addin@yahoogroups.com 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 ---
>

Sat Jan 26, 2013 10:50 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

I've got it saved, for consideration when I am doing some work in that
routine. There are two issues i have with it:

1. It would screw up that data item for people that are already handling
that item as a text item. So it's not backward compatible. And you'd still
need to handle something at the end anyway, when Yahoo didn't pass a date
(e.g. an "NA" value or such).

2. Unfortunately, it's not as simple as the given code, because the
"items" list is not all 1-byte data codes. There are also 2-byte data
codes, such as "l1" and "d1". So it would actually require parsing out EACH
data code in the list, popping them off one at a time. There would be no
simple MID() function to use. I had originally gone down the path of that
parsing process, but I decided I really didn't want to get into coding of
EACH possible data code -- especially if Yahoo ever changed something. Not
that they have in the past 7 years, other than making some obsolete. After
all, it was just a CSV file I was converting in the first place.

I had originally put some date handling into the smfConvertData() process,
where I also attempt to convert data strings into potential numbers, but
had to take it out because it hosed up some data retrieval items. For
example, financial statement headings are something like "12-2012" which
the isDate() recognizes as a date, but CDate() converts to 12/1/2012. When
it should just be a text label. There were other issues, but I remember
that one.

This is the best way to offer enhancements. Then I can see if others pipe
up with a "Yes, I could really use that" or have some other comments.

On Sat, Jan 26, 2013 at 9:26 PM, calhandon bozo@donandcarla.com> wrote:

> Hi Randy,
>
> Just wondering if you saw the post below?
>
> Is there a better way to offer suggested enhancements to you, or do you
> prefer to not receive enhancements?
>
> Do you have a bunch of different static data that you use for testing
> changes to the SMF add-in?
>
> Thank you, Randy.
>
> -Don
>

Sun Jan 27, 2013 6:26 am (PST) . Posted by:

"Rosendo Manuel" rosendojose

Good morning Randy,

I'm living in Lisbon (Portugal) and you are right. When I entered your suggested address the browser redirected me to "http://uk.advfn.com/p.php?pid=financials&symbol=MMM".
Is there a way to force it to work properly (as I desire, of course :))?

Cheers

Rosendo

--- In smf_addin@yahoogroups.com, Randy Harmelink wrote:
>
> Take a look at the AdvFN item in the LINKS area of the group. Hopefully,
> that's why you're having troubles with AdvFN.
>
> Or, are you located in a foreign country, so that AdvFN would redirect you?
> For example, if you enter this in the address bar of your browser, what
> address is there after the web page is displayed:
>
> http://www.advfn.com/p.php?pid=financials&symbol=MMM
>
> On Fri, Jan 25, 2013 at 3:38 PM, Rosendo Manuel wrote:
>
> >
> > However, using your example with the element number 10786, I get an error
> > again.
> >
> > I don't understand why all is fine eith you in Piotroski formulas and I
> > have errors only with numbers 15002, 15004 to 15006 and 15008 to 15011. The
> > others are fine.
> >
> > Do you have any idea or sugestion what might cause this divergence between
> > ours spreadsheets?
> >
>

Tidak ada komentar:

Posting Komentar