Formulas and Functions Help
- Welcome
- Intro to formulas and functions
-
- ACCRINT
- ACCRINTM
- BONDDURATION
- BONDMDURATION
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNUM
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENCYCODE
- CURRENCYCONVERT
- CURRENCYH
- DB
- DDB
- DISC
- EFFECT
- FV
- INTRATE
- IPMT
- IRR
- ISPMT
- MIRR
- NOMINAL
- NPER
- NPV
- PMT
- PPMT
- PRICE
- PRICEDISC
- PRICEMAT
- PV
- RATE
- RECEIVED
- SLN
- STOCK
- STOCKH
- SYD
- VDB
- XIRR
- XNPV
- YIELD
- YIELDDISC
- YIELDMAT
-
- AVEDEV
- AVERAGE
- AVERAGEA
- AVERAGEIF
- AVERAGEIFS
- BETADIST
- BETAINV
- BINOMDIST
- CHIDIST
- CHIINV
- CHITEST
- CONFIDENCE
- CORREL
- COUNT
- COUNTA
- COUNTBLANK
- COUNTIF
- COUNTIFS
- COVAR
- CRITBINOM
- DEVSQ
- EXPONDIST
- FDIST
- FINV
- FORECAST
- FREQUENCY
- GAMMADIST
- GAMMAINV
- GAMMALN
- GEOMEAN
- HARMEAN
- INTERCEPT
- LARGE
- LINEST
- LOGINV
- LOGNORMDIST
- MAX
- MAXA
- MAXIFS
- MEDIAN
- MIN
- MINA
- MINIFS
- MODE
- NEGBINOMDIST
- NORMDIST
- NORMINV
- NORMSDIST
- NORMSINV
- PERCENTILE
- PERCENTRANK
- PERMUT
- POISSON
- PROB
- QUARTILE
- RANK
- SLOPE
- SMALL
- STANDARDIZE
- STDEV
- STDEVA
- STDEVP
- STDEVPA
- TDIST
- TINV
- TTEST
- VAR
- VARA
- VARP
- VARPA
- WEIBULL
- ZTEST
STOCKH
The STOCKH function returns historical price information about a stock for a given date, retrieved remotely via the Internet.
STOCKH(symbol, close, date)
symbol: An abbreviation that uniquely identifies publicly traded shares of a stock on a particular stock market. symbol is a string enclosed in quotes. symbol can also be a reference to a cell containing a stock symbol.
close: An optional modal value specifying the stock attribute to be returned.
“close“ (0 or omitted): The price of the stock at the close of trading on the specified date.
“open” (1): The opening price at which the stock traded at the opening of trading on the specified date.
“high” (2): The highest price at which the stock traded on the specified date.
“low” (3): The lowest price at which the stock traded on the specified date.
“volume” (4): The number of shares of the stock that changed hands on the specified date.
date: The date for which you want the historical stock price information. date can be a valid past date string enclosed in quotes (for example “11/1/2014” or “Dec 31, 2015”), a formula that returns a past date, or a reference to a cell containing a valid past date or data formula.
Notes
If you enter a formula with STOCKH when the internet is unavailable, STOCKH returns no value. However, when the internet becomes available, the formula updates with a value returned by STOCKH.
The currency shown in this function result depends on your Language & Region settings (in System Preferences in macOS and in Settings in iOS and iPadOS), or on your Time Zone & Region settings in iCloud Settings.
Examples |
---|
=STOCKH(“AAU”, “volume”, “Dec 15, 2015”) returns 127,700, the number of shares of Almaden Minerals Ltd. Common Stock (AAU) traded (volume) on December 15, 2015. =IFERROR(STOCKH(A9, “low”, “May 22, 2017”), “-”) returns the lowest trading price on May 22, 2017 of the stock whose symbol is in cell A9 (if the stock symbol and the formula are valid), or “-” if there’s an error in the formula or the data can’t be retrieved. =IFERROR(STOCKH(“^HSI”, 2, "5/9/2016”), “No data”) returns the highest share price (“high” or 2) of Hang Seng Index stock (^HSI) on 5/9/2016, or “No data” if Hang Seng Index wasn’t traded on that day, or there’s no data available. |
The STOCKH function is powered by