Senin, 09 Februari 2015

[smf_addin] Digest Number 3317[1 Attachment]

9 Messages

Digest #3317
1a
Another Gurufocus question by "Jim Ranum" amt2100
1b
Re: Another Gurufocus question [1 Attachment] by "Randy Harmelink" rharmelink
1c
Re: Another Gurufocus question by "Jim Ranum" amt2100
1d
Re: Another Gurufocus question by "Jim Ranum" amt2100
1e
Re: Another Gurufocus question by "Randy Harmelink" rharmelink
1f
Re: Another Gurufocus question by "Randy Harmelink" rharmelink
1g
Re: Another Gurufocus question by "Jim Ranum" amt2100
2
ETF Analyzer by bobsledproductions

Messages

Sun Feb 8, 2015 5:47 pm (PST) . Posted by:

"Jim Ranum" amt2100

Hi Randy,

Sorry to bother you again so soon. It appears Gurufocus has made a change to
their webpage and a formula you worked out for me a while back has stopped
working. I didn't even know, since the cells continued to have reasonable
numbers!

I see in the source code that they changed it, but I can't figure out how to
change my formula to grab the correct number.

This is on the Stock Summary page/tab. They added a couple new Ratios that I
wanted to grab and as I tried to input the formula, I only then realized
that they changed the code and I was actually getting bad numbers on the
existing formulas.

The new fields that I would like are the Industry median of the Forward P/E
and PE(NRI).

Here is the formula that had been working to pull the industry median for
the P/E(ttm):

=smfConvertData(smfstrExtr(smfGetTagContent("http://www.gurufocus.com/stock/
"&$F$43,"td",-1,"id=""pettm_indu_tools"""),"Median:","vs"))

Below (and attached) is a screenshot of the source code and you can see they
changed the format/code. I have no idea how to redo the formula, since the
words Industry Median appear repeatedly on the page and there doesn't seem
to be a unique phrase to pivot off of.

Thanks again for your help.

Best regards,

Jim

Attachment(s) from Jim Ranum
1 of 1 Photo(s)

Sun Feb 8, 2015 6:54 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

The problem appears to be that they have the industry mean section in the
code of the web page twice, with the first set commented out. Any searches
going forward will currently find the first set, which I'm assuming is an
old value in the comment. So, I would suggest:

=smfConvertData(smfStrExtr(smfStrExtr(smfGetTagContent("
http://www.gurufocus.com/stock/"&$B9,"td",2,">Forward
P/E"),"Median:","~"),"Median: "," "))

=smfConvertData(smfStrExtr(smfStrExtr(smfGetTagContent("
http://www.gurufocus.com/stock/"&$B9,"td",2,">PE(NRI)"),"Median:","~"),"Median:
"," "))

However, if they later generate the web page without the comments, those
will fail since they are extracting the second "Median:" value in the table
cell.

BTW, did you ever become a subscriber to the site?

On Sun, Feb 8, 2015 at 6:47 PM, 'Jim Ranum' amt2100@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Sorry to bother you again so soon. It appears Gurufocus has made a change
> to their webpage and a formula you worked out for me a while back has
> stopped working. I didn't even know, since the cells continued to have
> reasonable numbers!
>
> I see in the source code that they changed it, but I can't figure out how
> to change my formula to grab the correct number.
>
>
>
> This is on the Stock Summary page/tab. They added a couple new Ratios that
> I wanted to grab and as I tried to input the formula, I only then realized
> that they changed the code and I was actually getting bad numbers on the
> existing formulas.
>
>
>
> The new fields that I would like are the *Industry median* of the Forward
> P/E and PE(NRI).
>
>
>
> Here is the formula that had been working to pull the industry median for
> the P/E(ttm):
>
> =smfConvertData(smfstrExtr(smfGetTagContent("
> http://www.gurufocus.com/stock/
> "&$F$43,"td",-1,"id=""pettm_indu_tools"""),"Median:","vs"))
>
>
>
> Below (and attached) is a screenshot of the source code and you can see
> they changed the format/code. I have no idea how to redo the formula, since
> the words Industry Median appear repeatedly on the page and there doesn't
> seem to be a unique phrase to pivot off of.
>
>
>
> Thanks again for your help.
>
>
>

Sun Feb 8, 2015 7:09 pm (PST) . Posted by:

"Jim Ranum" amt2100

Thanks Randy. Yes I did sign up for the Premium service.

So the safe thing would be to put the formula below in one cell and in an adjacent cell put the same formula with a "1" instead of a "2"? That way I'd have the correct number one way or another?

Thanks again!

Best regards,

Jim

From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com]
Sent: Sunday, February 08, 2015 9:54 PM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Another Gurufocus question

The problem appears to be that they have the industry mean section in the code of the web page twice, with the first set commented out. Any searches going forward will currently find the first set, which I'm assuming is an old value in the comment. So, I would suggest:

=smfConvertData(smfStrExtr(smfStrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$B9,"td",2,">Forward P/E"),"Median:","~"),"Median: "," "))

=smfConvertData(smfStrExtr(smfStrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$B9,"td",2,">PE(NRI)"),"Median:","~"),"Median: "," "))

However, if they later generate the web page without the comments, those will fail since they are extracting the second "Median:" value in the table cell.

BTW, did you ever become a subscriber to the site?

On Sun, Feb 8, 2015 at 6:47 PM, 'Jim Ranum' amt2100@gmail.com <mailto:amt2100@gmail.com> [smf_addin] <smf_addin@yahoogroups.com <mailto:smf_addin@yahoogroups.com> > wrote:

Sorry to bother you again so soon. It appears Gurufocus has made a change to their webpage and a formula you worked out for me a while back has stopped working. I didn't even know, since the cells continued to have reasonable numbers!

I see in the source code that they changed it, but I can't figure out how to change my formula to grab the correct number.

This is on the Stock Summary page/tab. They added a couple new Ratios that I wanted to grab and as I tried to input the formula, I only then realized that they changed the code and I was actually getting bad numbers on the existing formulas.

The new fields that I would like are the Industry median of the Forward P/E and PE(NRI).

Here is the formula that had been working to pull the industry median for the P/E(ttm):

=smfConvertData(smfstrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$F$43,"td",-1,"id=""pettm_indu_tools"""),"Median:","vs"))

Below (and attached) is a screenshot of the source code and you can see they changed the format/code. I have no idea how to redo the formula, since the words Industry Median appear repeatedly on the page and there doesn't seem to be a unique phrase to pivot off of.

Thanks again for your help.

Sun Feb 8, 2015 7:14 pm (PST) . Posted by:

"Jim Ranum" amt2100

BTW, what does the "~" do in the formula? Never seen that one.

Best regards,

Jim

From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com]
Sent: Sunday, February 08, 2015 9:54 PM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Another Gurufocus question

The problem appears to be that they have the industry mean section in the code of the web page twice, with the first set commented out. Any searches going forward will currently find the first set, which I'm assuming is an old value in the comment. So, I would suggest:

=smfConvertData(smfStrExtr(smfStrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$B9,"td",2,">Forward P/E"),"Median:","~"),"Median: "," "))

=smfConvertData(smfStrExtr(smfStrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$B9,"td",2,">PE(NRI)"),"Median:","~"),"Median: "," "))

However, if they later generate the web page without the comments, those will fail since they are extracting the second "Median:" value in the table cell.

BTW, did you ever become a subscriber to the site?

On Sun, Feb 8, 2015 at 6:47 PM, 'Jim Ranum' amt2100@gmail.com <mailto:amt2100@gmail.com> [smf_addin] <smf_addin@yahoogroups.com <mailto:smf_addin@yahoogroups.com> > wrote:

Sorry to bother you again so soon. It appears Gurufocus has made a change to their webpage and a formula you worked out for me a while back has stopped working. I didn't even know, since the cells continued to have reasonable numbers!

I see in the source code that they changed it, but I can't figure out how to change my formula to grab the correct number.

This is on the Stock Summary page/tab. They added a couple new Ratios that I wanted to grab and as I tried to input the formula, I only then realized that they changed the code and I was actually getting bad numbers on the existing formulas.

The new fields that I would like are the Industry median of the Forward P/E and PE(NRI).

Here is the formula that had been working to pull the industry median for the P/E(ttm):

=smfConvertData(smfstrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$F$43,"td",-1,"id=""pettm_indu_tools"""),"Median:","vs"))

Below (and attached) is a screenshot of the source code and you can see they changed the format/code. I have no idea how to redo the formula, since the words Industry Median appear repeatedly on the page and there doesn't seem to be a unique phrase to pivot off of.

Thanks again for your help.

Sun Feb 8, 2015 7:20 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

I signed up for the premium service at the end of the year when they had
the 20% discount.

No. It's the second smfStrExtr() using "Median:" that grabs the second
item. Not the skipping forward parameter of smfGetTagContent(). So, right
now, the first one can be retrieved with:

=smfConvertData(smfStrExtr(smfGetTagContent("http://www.gurufocus.com/stock/"&$B9,"td",2,">Forward
P/E"),"Median: "," "))

Note that for Forward P/E and PE(NRI), there are blanks on the first set,
so the above formula grabs empty space.

On Sun, Feb 8, 2015 at 8:09 PM, 'Jim Ranum' amt2100@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Thanks Randy. Yes I did sign up for the Premium service.
>
>
>
> So the safe thing would be to put the formula below in one cell and in an
> adjacent cell put the same formula with a "1" instead of a "2"? That way
> I'd have the correct number one way or another?
>
> Thanks again!
>
>
>

Sun Feb 8, 2015 7:26 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

The "~" is a placeholder in the smfStrExtr() function that indicates the
very start or the very end of the string from which data is being
extracted, where there is nothing that could possibly be "searched" for.

For example:

=smfStrExtr("abcde","~","c") returns "ab", from the start of the string up
to "c"

=smfStrExtr("abcde","c","~") returns "de", from after "c" to the end of the
string

=smfStrExtr("abcde","~","~") returns "abcde", everything from the very
start to the very end

I used to do something like:

=smfStrExtr("|" & A1,"|","c")

...but got tired of always needed to append something to the front or the
back for the string extraction. So I just coded it into the function itself.

On Sun, Feb 8, 2015 at 8:14 PM, 'Jim Ranum' amt2100@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> BTW, what does the "~" do in the formula? Never seen that one.
>
>
>

Sun Feb 8, 2015 7:36 pm (PST) . Posted by:

"Jim Ranum" amt2100

Ah, very nice. I don't feel so bad then, not knowing, since you coded it into your VBA.

Thanks again.

Best regards,

Jim

From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com]
Sent: Sunday, February 08, 2015 10:26 PM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Another Gurufocus question

The "~" is a placeholder in the smfStrExtr() function that indicates the very start or the very end of the string from which data is being extracted, where there is nothing that could possibly be "searched" for.

For example:

=smfStrExtr("abcde","~","c") returns "ab", from the start of the string up to "c"

=smfStrExtr("abcde","c","~") returns "de", from after "c" to the end of the string

=smfStrExtr("abcde","~","~") returns "abcde", everything from the very start to the very end

I used to do something like:

=smfStrExtr("|" & A1,"|","c")

...but got tired of always needed to append something to the front or the back for the string extraction. So I just coded it into the function itself.

On Sun, Feb 8, 2015 at 8:14 PM, 'Jim Ranum' amt2100@gmail.com <mailto:amt2100@gmail.com> [smf_addin] <smf_addin@yahoogroups.com <mailto:smf_addin@yahoogroups.com> > wrote:

BTW, what does the "~" do in the formula? Never seen that one.

Sun Feb 8, 2015 5:49 pm (PST) . Posted by:

bobsledproductions

Just uploaded an ETF Analyzer spreadsheet here:


ETF Analyzer | The Toteboard @Toteboard.net http://toteboard.net/blog/workbooks/etf-analyzer/



http://toteboard.net/blog/workbooks/etf-analyzer/

ETF Analyzer | The Toteboard @Toteboard.net http://toteboard.net/blog/workbooks/etf-analyzer/ Functionality Overview



View on toteboard.net http://toteboard.net/blog/workbooks/etf-analyzer/
Preview by Yahoo






Mon Feb 9, 2015 12:57 am (PST) . Posted by:

tysongayada

thanks randy.

there are some more problem.


1) while trying to extract the financial data from supposedly


=RCHGetHTMLTable("http://markets.ft.com/research/Markets/Tearsheets/Financials?s="&C2&"&subview=BalanceSheet","Annual data<",-3,"",-3),



i am able to pickup the annual balance sheet from cell C2.


do you have any trick to pick up the Interim Data as well?


2) i am trying to pick up the company info for ibm


International Business Machines Corporation (IBM) is an information technology (IT) company. IBM operates in five segments: Global Technology Services (GTS), Global Business Services (GBS),......



=RCHGetHTMLTable("http://markets.ft.com/research/Markets/Tearsheets/Business-profile?s=IBM:NYQ","About",-2,"",-2)



just dont seem to go anywhere.


Did i pick the wrong table?


For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Poskan Komentar