Previous Close (On Demand)

Gets the previous trading day's closing price on-demand (snapshot) from QuoteMedia. This is the reference price for calculating daily change.

Supported Symbol Formats

Type Format Example
US Stocks SYMBOL AAPL, MSFT
ETFs SYMBOL SPY, QQQ
Indices ^SYMBOL ^SPX, ^VIX

Notes

  • Returns a snapshot (does not auto-update)
  • Used as baseline for daily change calculations
  • Important for gap analysis

Syntax

=QM_PreviousClose(Symbol)
Excel Desktop (Windows)

Examples

=QM_PreviousClose("AAPL")
Previous close for Apple
=QM_PreviousClose("MSFT")
Previous close for Microsoft
=QM_PreviousClose("SPY")
Previous close for SPY ETF
Symbol from cell reference
=QM_Last("AAPL")-QM_PreviousClose("AAPL")
Calculate daily change

When to Use

  • Gap analysis (open vs previous close)
  • Change calculations
  • Static reports
  • Reference price comparisons

When NOT to Use

Scenario Use Instead
Need streaming previous close QM_Stream_PreviousClose()
Need historical close on date Close_Historical()
Need today's close QM_Last()

Common Issues & FAQ

What is previous close?

The official closing price from the most recent completed trading session (typically yesterday).

How do I calculate the gap?

Use =QM_Open("AAPL")-QM_PreviousClose("AAPL").

Why am I getting #N/A?

Check that symbol format is correct.

Excel Templates Using Previous Close (On Demand)

These ready-made MarketXLS templates call QM_PreviousClose() in their worksheet formulas. Open one to see the function working inside a complete model.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Previous Close (On Demand) and Other Financial Formulas
How does MarketXLS work?