1

I can use ImportHTML in Google sheets to retrieve financial data from Yahoo Finance but it is lacking where Google Finance has the data. For example here is a link to Ford's financials on Google Finance how would I grab this data with ImportHTML in Google Sheets?

https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG

Rubén
  • 34,714
  • 9
  • 70
  • 166
CodeCamper
  • 6,609
  • 6
  • 44
  • 94

1 Answers1

4

It depends on exactly what you want. These get all available tables:

Income Statement Quarterly Data

=importhtml(
"https://www.google.com/finance? q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",2)

Income Statement Annual Data

=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",3)

Balance Sheet Quarterly Data

=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",4)

Balance Sheet Annual Data

=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",5)

Cash Flow Quarterly Data

=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",6)

Cash Flow Annual Data

=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",7)

To get other companies, enter the stock symvol (i.e.; F, GOOG, IBM) in a cell and reference the cell in the URL. Like this:

=importhtml(
"https://www.google.com/finance?q="&A2&"&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",2) 

The "&A2&" references the cell A2. The formula will get the data for the company in cell A2.

Rubén
  • 34,714
  • 9
  • 70
  • 166
Ed Nelson
  • 10,015
  • 2
  • 27
  • 29
  • Any idea how to change the link for other companies? I'm not understanding how to generate the seemingly random string after the symbol without manually visiting the website first and getting the link for each company. – CodeCamper Oct 28 '16 at 12:57
  • @CodeCamper See the addition to my answer. – Ed Nelson Oct 28 '16 at 13:58