Syntax
=GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date|num_days], [interval])Arguments
| Argument | Required | Description |
|---|---|---|
ticker | Required | The ticker symbol |
attribute | Optional | What to fetch, like "price" |
start_date | Optional | Start of the period |
end_date|num_days | Optional | End of the period or number of days |
interval | Optional | "DAILY" or "WEEKLY" |
How to use GOOGLEFINANCE
This function reads data from outside the workbook, so its result depends on what the source returns when the sheet calculates.
GOOGLEFINANCE takes 1 required argument and 4 optional arguments. Type =GOOGLEFINANCE( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=GOOGLEFINANCE("NASDAQ:GOOG")Result Related web functions
- ENCODEURLEncodes text so it can be used safely inside a web address.
- FILTERXMLReads values from XML using an XPath. It is turned off for safety, so this returns #BLOCKED!.
- HYPERLINKCreates a link that opens a web page or a place in the workbook when clicked.
- IMAGEShows a picture from a web address inside the cell.
- IMPORTDATAImports a CSV or TSV file from a web address. Live web data is not available yet, so this returns #BLOCKED!.
- IMPORTFEEDImports an RSS or Atom feed. Live web data is not available yet, so this returns #BLOCKED!.
- IMPORTHTMLImports a table or list from a web page. Live web data is not available yet, so this returns #BLOCKED!.
- IMPORTRANGEImports a range from another spreadsheet. Live web data is not available yet, so this returns #BLOCKED!.
- IMPORTXMLImports data from a web page using an XPath query. Live web data is not available yet, so this returns #BLOCKED!.