'What is the problem with inserting dividend from finviz.com to Google sheets?
I use this formula to get dividend:
=IfError(IF(isblank(A2),"", substitute(index(IMPORTHTML("http://finviz.com/quote.ashx?t="&A2,"table", 8),7,2),"*","")),0)
In A2, I have as text EIX. I expect that every field in which I put this formula, I will get annual dividend for company Edison International.
The link "https://finviz.com/quote.ashx?t=EIX" is working correctly in browser.
The mentioned formula works correctly on a sheet copied from the interne, but when I use it to my own project, it isn't working. For now I have two columns on my project: ticker and annual dividend.
Solution 1:[1]
I just have a temporary solution (but base problem isn't solved):
- I copy a document that is working well with IMPORTHTML
- I make a new sheet with my project in the copied document where I saw it's working
It seems there is a bug.
GOOGLEFINANCE() is working well.. Only IMPORTHTML have some problems.
UPDATE:
I had solved the problem.
- I had changed in google drive (from settings) the language from Romanian to English and
- I had turned off "Automatically add languages."
Now it works well with new documents but old documents still can not use INPORTHTML.
If you want to use Romanian interface and INPORTHTML function, you can change the language to English, create the dococument (Google Sheets in our case) and change back to English.
Just a small bug!
Initially I had suspected a problem related to the fact that my account is old (outdated) but with a new account the problem is still present. After changing some settings, I found a problem with the language of account!
Also, it seems that Romanian interface can work but use a different syntax. When I had used another function, I had a problem and solution was changing "," with ";".
Solution 2:[2]
Try
=REGEXEXTRACT(index(IMPORTHTML("http://finviz.com/quote.ashx?t="&A2,"table", 8),7,2),"[0-9.]+")
if you replace star *
, that means that your replace everything!
in Romanian
=REGEXEXTRACT(index(IMPORTHTML("http://finviz.com/quote.ashx?t="&A3;"table"; 8);7;2);"[0-9.]+")
https://docs.google.com/spreadsheets/d/1iEotutoVIb6abApZs4ROyIh4IXHn_X1NSzSUxrst2Ww/copy
Solution 3:[3]
I know this is an old post but maybe this can help someone who comes looking as I had the same issue and just figured it out.
There is nothing wrong with the IMPORTHTML function, the table has just changed. The function should read:
=IfError(IF(isblank(A2),"", substitute(index(IMPORTHTML("http://finviz.com/quote.ashx?t="&A2,"table", 9),7,2),"*","")),0)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | |
Solution 3 | DharmanBot |