Get the Last Traded Price with QM_Last

The QM_Last function in MarketXLS is designed to seamlessly retrieve the most recent (last traded) price of a security in your Excel spreadsheet. By simply passing a valid ticker symbol, you can dynamically display real-time or near real-time price data from QuoteMedia. This function is ideal for traders, analysts, and anyone needing quick updates on market movements without leaving Excel.

Why Use This Function?

  • Stay updated with the latest market price directly in Excel.
  • Quickly compare multiple securities’ last prices in a single spreadsheet.
  • Streamline your workflow by reducing the need to visit external data sources manually.
  • Automate pricing updates for portfolio or watchlist tracking.
  • Ideal for building dynamic models, dashboards, and real-time analysis tools.

How to Use in Excel

QM_Last(symbol)
  1. Insert the formula into a cell where you want the last price displayed.
  2. Replace symbol with the valid ticker string (e.g., "AAPL").
  3. Press Enter, and MarketXLS will handle the data retrieval behind the scenes.

For example, if you enter:
=QM_Last("AAPL")
it will return Apple’s latest traded price in your Excel cell.

Parameters Explained

Parameter Description Example Values Notes
symbol The ticker symbol (string) for which you want the last traded price. "AAPL", "MSFT", "GOOG" Must be a valid ticker symbol. If invalid, empty, or if data isn’t available, it may return "NA", "ERR", or "Please Refresh".

When you provide a ticker symbol with different formatting or spacing, QM_Last attempts to normalize it before fetching data. If you use an invalid or blank symbol, you might see a fallback message like "NA" or "Please Refresh" indicating the data cannot currently be retrieved.

Example Usage

Basic Examples

  1. =QM_Last("AAPL")
    • Retrieves the last traded price for Apple.
    • If Apple’s data is already cached, the formula returns the cached value. Otherwise, MarketXLS attempts to fetch the real-time price.

  2. =QM_Last("MSFT")
    • Shows Microsoft’s latest traded price.
    • If licensing or connection issues occur, you may see an error message or be prompted to refresh.

  3. =QM_Last("GOOG")
    • Useful for comparing with other stocks in the same worksheet.
    • If data is actively refreshing, the cell might temporarily display "Refreshing".

Advanced Scenarios

• Creating a Real-Time Watchlist: Enter multiple QM_Last formulas in adjacent cells, each referencing a different ticker symbol (e.g., "AAPL", "TSLA", "NFLX"). This setup instantly forms a watchlist that updates with new prices as they become available.

• Integrating with Other Functions: Pair QM_Last with Excel’s built-in calculations—like subtracting or adding from a known reference price—to measure daily price changes or evaluate potential portfolio gains.

• Dynamic Dashboard: Combine QM_Last with MarketXLS’s other metrics, such as open, high, or low functions, to craft a complete technical analysis dashboard in a single spreadsheet.

Common Questions and Troubleshooting

  1. Why am I getting "NA" instead of a price?

    • The provided symbol may be invalid, blank, or not found. Double-check the ticker symbol, and ensure you have the correct market data subscription.
  2. What does "Please Refresh" mean?

    • It indicates that MarketXLS requires a manual or automated refresh to retrieve current information. Follow the instructions in MarketXLS to refresh data.
  3. Why does it show "ERR" or a license-related message?

    • Your MarketXLS license might be invalid or expired. Verify your subscription status under MarketXLS Settings and ensure your license is active.
  4. Can I check multiple symbols at once?

    • Yes. Simply place the QM_Last function in multiple cells with different symbol parameters.
  5. How often does the data update?

    • Data refresh intervals depend on your MarketXLS subscription level and Excel refresh settings. You can usually refresh manually or on a set schedule.

By leveraging QM_Last for last traded price retrieval, you can keep your financial analytics and trading decisions fully integrated with Excel. It is a powerful tool for anyone seeking quick, reliable market data without constant manual lookups. Adjust symbols, combine formulas, and mix with other MarketXLS functions to build a comprehensive trading or analytical solution—all within Excel.

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 Last (On Demand) and Other Financial Formulas
How does MarketXLS work?