Is there a way to print out the GICS sector name for a specific share/ETF symbol in google sheets using the GOOGLEFINANCE commands or any other way?
Many thanks
Is there a way to print out the GICS sector name for a specific share/ETF symbol in google sheets using the GOOGLEFINANCE commands or any other way?
Many thanks
I used this site to find several scraping methods to get data from finviz. https://decodingmarkets.com/scrape-stock-data-from-finviz/
Extending their logic, I was able to get the company name, and the combined sector/subsector codes
(I originally used the website's scraping techniques to get Dividend data that GoogleFinance formula lacks...)
This formula gets the company name using US ticker symbol in cell C3:
=SUBSTITUTE(INDEX(IMPORTHTML("http://finviz.com/quote.ashx?t="&C3,"table",6),2,1),"*","")
Through trial and error, I found that table 6 has name and sectors. I then referenced the 2nd row and 1st column to get the name. I found that row 3, column 1 has the sector, subsector and country combined as one value. They use a pipe | delimiter for each break.
Using the split function, I was able to split segment.
=SPLIT(SUBSTITUTE(INDEX(IMPORTHTML("http://finviz.com/quote.ashx?t="&C3,"table",6),3,1),"*",""),"|",true,true)
Check out the official docs:
It has a lot of options but unfortunately, not that one.
If you think it would be useful, then make sure you file a feature request @
@GSee said it best here: https://stackoverflow.com/a/16525782/10445017
If want to get the details in one column then may use this formula.
=IF(ISBLANK($A5),"-", CONCATENATE ( SUBSTITUTE(INDEX(IMPORTHTML("https://finviz.com/quote.ashx?t="&A5,"table",8),2,1),"*","")))