Google Finance Google Sheets ImportHTML to retrieve Financial Statements - google-sheets

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

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.

Related

Google sheets - How to import revenue from Google Finance

I have a gsheet, where in the column A there are plenty of listed companies' (from different stock exchanges) tickers. In column B and C I need to have a data regarding Market Capitalization and Revenue for each company respectively. For Market Cap I've just used Googlefinance formula, but unfortunately due to its limitation I am unable to import the financial data.
I've tried "=IMPORTXML("https://www.google.com/finance/quote/TICKER","//table//tr[contains(#class,'roXhBd')]")" but unfortunately it returns only quaterly data, and I have no idea how to convert it to display annual values.

Can you pull information from another sheet dynamically such that it is effectively a join?

I am tracking my stock purchases using Google sheets. I have separated the stocks that I have purchased into their own sheets and have an overview page
I want the data in the external sheets to automatically populate the overview list, where the overview stays up to date with the source sheets, and remain sorted by date.
This is the outcome I am looking for, though I made it manually:
Example sheet:
https://docs.google.com/spreadsheets/d/1okVUHw7DKDbzIwNHE1f38Ew81dEO_n27nrgyYV9zLzs/edit?usp=sharing
Try below query formula. See the sheet link harun24hr.
=QUERY({QUERY({VAP.ASX!A2:A,INDEX(SUBSTITUTE(VAP.ASX!G2:I2&SEQUENCE(ROWS(VAP.ASX!A2:A),1,1,0),"1","")),VAP.ASX!B2:E},"where Col1 is not null",0);
QUERY({UMAX.ASX!A2:A,INDEX(SUBSTITUTE(UMAX.ASX!G2:I2&SEQUENCE(ROWS(UMAX.ASX!A2:A),1,1,0),"1","")),UMAX.ASX!B2:E},"where Col1 is not null",0)},"order by Col1",0)
Google-sheet Link

GoogleFinance - Adjusted Stock Close Price

Is there a method to use GoogleFinance() in Google Sheets to get the Adjusted Close price, which adjusts for Splits and Dividends like Yahoo Finance?
I believe the historical Price from Google Finance is adjusted
=GOOGLEFINANCE("GOOG", "Price", DATE(2021,6,16))
Matches the adjusted column in Yahoo Finance

Retrieve stock "change in percentage" in google spreadsheet with ImportXML()

I would like to retrieve stock data on Google Spreadsheet through the ImportXML() function.
Suppose I want to retrieve stock data of SHA:000001
To retrieve price, the formula to use is;
=ImportXML("https://www.google.com/finance?q=SHA:000001", "//span[#class='pr']")
What is the formula to use for retrieving "price change in percentage" for the day?
This worked for me:
=ImportXML("https://www.google.com/finance?q=SHA:000001", "//div[#class='id-price-change nwp']/span/span[2]")

Simple time functions in Excel/Google Sheets

I am creating a tool for my restaurant. Everyday, I have employees input their sales numbers into a Google Form on their phones. The results of which are archived in a Google Sheets spreadsheet as 'FormResults'.
I need a way to auto-write only the most recent values of each employee's formResults data into the appropriate slots to do the daily calculations of tips in sheet1.
I also want to archive the form data. This is why I don't just manually input the data daily into the calculator.
This is my crude If statement:
If {A15=today,B15=Mike} then write Contents of C15 into this cell
A1,B2,C2 are in sheet2 and I want sheet1 to only display the most recent value of each of these.
Do either of these work as you want (assuming cell A1 contains the employee name)?
To return the data from most recent date:
=MAX(FILTER(sheet2!C:C,sheet2!B:B=A1))
Or to return data from today
=FILTER(sheet2!C:C,sheet2!B:B=A1,INT(sheet2!A:A)=TODAY())

Resources