The spreadsheet contains a full list of the types of financial data, and the corresponding value of the second argument. The Yahoo Finance API offers over programmatic access to over 80 types of financial data. The function takes the form YahooFinance(ticker As String, item As String). The VBA function use the Yahoo Finance API, and the code is given below (a spreadsheet also implements the function and gives a few examples of its use). It’s more stable than this VBA function and offers lifetime support and updates. UPDATE: If you want a professional Excel add-in at a low price for live stock quotes, option prices and more, then investigate MarketXLS. You can use the function to develop your own stock screeners, identify undervalued shares, keep track of your portfolio value, and more.
The data updates to reflect current market values when you re-open or re-calculate your spreadsheet. You can insert the live market price, EPS, PE, 52-week high, book value, or any other of over 80 quotes into a cell with this VBA function. Get live financial data, streamed from the web, in Excel with this VBA function.