2

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

mindbomb
  • 1,604
  • 3
  • 20
  • 34

2 Answers2

1

Its not available from Sheets

Check out the official docs:

https://support.google.com/docs/answer/3093281?hl=en

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 @

https://developers.google.com/issue-tracker

As for any other way

@GSee said it best here: https://stackoverflow.com/a/16525782/10445017

iansedano
  • 5,691
  • 2
  • 11
  • 21
1

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)
Joman68
  • 1,579
  • 3
  • 27
  • 28
Walter
  • 11
  • 1