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)Examples
=QM_PreviousClose("AAPL")=QM_PreviousClose("MSFT")=QM_PreviousClose("SPY")=QM_PreviousClose(A1)=QM_Last("AAPL")-QM_PreviousClose("AAPL")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.
Related Formulas
More MarketXLS Price Quotes formulas you can use in the same worksheet:
- Price Range Current Day
- QM Ask Size
- QM Get Recent Option Stats Dynamic
- Quote DateTime (On Demand)
- Raw Ask Size
- Raw Bid Size
- Share Volume
- Strike (On Demand)
See QM_PreviousClose used in a complete workbook: Best Excel Add-in for Stock Data: Top 8 Plugins for Real-Time Market Analysis (2026)
