ClimberMel / SMF_Add-in

Stock Market Functions for Excel using VBA
https://climbermel.github.io/SMF_Add-in/
14 stars 5 forks source link

RCHGetElementNumber #21

Closed ClimberMel closed 1 year ago

ClimberMel commented 1 year ago

Check list for Zacks - Earnings Estimates Not Working. From Steve: Recently (perhaps last week), I found the Zacks Estimates (specifically 868, 869 and 874) stopped working. It appears element 13871 works for 868 while 13872 works for 869 however I cannot find a working element for "Zacks EPS Next Year" while I can find the data on the webpage below (shown for AAPL)

https://www.zacks.com/stock/quote/AAPL/detailed-earning-estimates

I have tried the various versions on here including Climber Mel's latest but to no avail. I like to compare and contrast Yahoo's Estimates with Zacks so it would be useful (at least to me!) if this was possible.

From Craig: It's my impression that the maintenance of a large library of RCHGetElementNumber functions became unsupportable due to continuous changes in the various data source pages. If it works, use it. If not, look for an alternative.

The first thing to check when trying to pull data off a web page using the SMF tools is whether the data you want is in the page source. To view the page source, right click on the page in your browser and select the appropriate menu option (View page source for Chrome). Search for the specific value/string you want (ctrl-f in Chrome). If the data is there, you're in luck. If not, you won't be able to pull that information using the SMF tools.

In this case, the web page you provided as an example looks like an easy, straight-forward extraction. You should be able to use RCHGetTableCell to extract what you want. Review the documentation on the github SMF page to familiarize yourself with how it works. With a little experimentation you should be able to get what you want. Here's an example that pulls the "Next Year" value (6.65) from the Estimates table:

=RCHGetTableCell("https://www.zacks.com/stock/quote/AAPL/detailed-earning-estimates",1,"Next Year")

ClimberMel commented 1 year ago

Elements 868, 869, 874 are all working now along with many of the Zack's elements.