Senin, 26 Agustus 2013

[smf_addin] Digest Number 2745

4 New Messages

Digest #2745
1b
Re: Dividend returning N/A- can it be blank? by "Randy Harmelink" rharmelink
2a
Re: write a similar loop by "cs.holdings" cs.holdings
2b
Re: write a similar loop by "Randy Harmelink" rharmelink

Messages

Sun Aug 25, 2013 12:18 pm (PDT) . Posted by:

bmissell_thornhill


As I'm learning this program and stocks in general just working on basic things at this point.

I am using element number 989 (YahooKS) to get the dividend for a stock. I know that some stocks don't have dividends. For those SMF is returning a "N/A". Is there a way to have it return a blank or a "-"? It may be an Excel issue that I'm not smart enough to know yet… I know I could "condition" the cells to "white out" the text – just wondering if there is an easier way.

My formula is "=RCHGetElementNumber($C3,989,"-")"

Thanks in advance for any help,
Bill

Sun Aug 25, 2013 12:24 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Well, the "N/A" is what is being posted. That's why the add-in is returning
it.

You could put an IFERROR() condition around it, so that any non-numeric
value causes an error. For example, something like:

=IFERROR(RCHGetElementNumber($C3,989)/1,"-")

...but then it would also set it to "-" if "Error" was returned by the
RCHGetElementNumber() function.

On Sun, Aug 25, 2013 at 11:23 AM, <bmissell@comcast.net> wrote:

>
> As I'm learning this program and stocks in general just working on basic
> things at this point.
>
> I am using element number 989 (YahooKS) to get the dividend for a stock. I
> know that some stocks don't have dividends. For those SMF is returning a
> "N/A". Is there a way to have it return a blank or a "-"? It may be an
> Excel issue that I'm not smart enough to know yet… I know I could
> "condition" the cells to "white out" the text – just wondering if there is
> an easier way.
>
> My formula is "=RCHGetElementNumber($C3,989,"-")"
>

Sun Aug 25, 2013 6:12 pm (PDT) . Posted by:

"cs.holdings" cs.holdings

Hi Randy

If I wanted to exceed 999 on the number of rows to loop, in which module can I find the code?

Thnx

--- In smf_addin@yahoogroups.com, "cs.holdings&quot; <pc_babe@...> wrote:
>
> OMG ... beautiful. Thanks
>
> --- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@> wrote:
> >
> > Just use the smfUpdateDownloadTable process. See the LINKS area of the
> > group for more info.
> >
> > On Sat, Aug 24, 2013 at 7:09 PM, cs.holdings <pc_babe@> wrote:
> >
> > >
> > > Is there a way to run a similar loop for =RCHGetElementNumber(A1:A3,5296)?
> > >
> > > 'Sub Test()
> > > ' Dim sItems As String
> > > ' Dim oCell As Range
> > > ' sItems = "D"
> > > ' For Each oCell In [B4:Z4]
> > > ' If oCell.Value2 = "" Then Exit For
> > > ' Range(oCell.Offset(1, 0), oCell.Offset(1350, 0)) =
> > > RCHGetYahooHistory(oCell.Value2, pResort:=1, pItems:=sItems, pDim1:=1350,
> > > pDim2:=1)
> > > ' sItems = "A"
> > > ' Next oCell
> > > ' End Sub
> > >
> >
>

Sun Aug 25, 2013 8:11 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Please don't download that much data. If you need that much, get something
like AAII's Stock Investor Pro. Overuse of the free data sources just gives
them an excuse to change their web pages so something like the add-in can
no longer work. The add-in is meant for ad hoc data retrieval, not for
building databases. You should use a good screening tool to get down to a
workable set of companies that you want more detailed data on.

It won't do you any good to go above 999 rows anyway, since the add-in can
only extract data from 1000 web pages in a session. Anything beyond the
1000 web pages will just return an error message.

On Sun, Aug 25, 2013 at 6:12 PM, cs.holdings <pc_babe@msn.com> wrote:

>
> If I wanted to exceed 999 on the number of rows to loop, in which module
> can I find the code?
>

Tidak ada komentar:

Posting Komentar