Lookup & Reference
RTD Function in Excel
Retrieves real-time data from a program that supports COM automation.
Syntax
- =RTD(progID, server, topic1, [topic2], ...)
Arguments
- progID (required): The program ID of the RTD server
- server (required): The server name (use empty string for local)
- topic1 (required): First topic to retrieve
- topic2 (optional): Additional topics
Examples
- =RTD("MyRTD.Server","","MSFT") - Get real-time stock data - Result: Real-time value
When to use RTD
- Use RTD when you need to retrieve values from a table or range based on a key.
- Confirm data types match (text vs number) and trim spaces before lookups.
- Pair with [IFERROR](/functions/iferror/) or [IFNA](/functions/ifna/) for cleaner reports.
- See the [lookup functions guide](/guides/excel-lookup-functions-guide/) for VLOOKUP, XLOOKUP, and INDEX MATCH paths.
Common RTD mistakes
- #N/A often means the key is missing or exact match is wrong — see [#N/A error](/errors/na/).
- Lock table references with $ when copying formulas down a column.
- Compare legacy vs modern lookups in [XLOOKUP vs VLOOKUP](/compare/xlookup-vs-vlookup/).
Common errors
- #N/A if server not available
- Requires COM server registration
Use cases
- Real-time stock prices
- Live data feeds
- Trading applications
Frequently asked questions
- What is the RTD function in Excel? RTD retrieves real-time data from a program that supports COM automation. The syntax is =RTD(progID, server, topic1, [topic2], ...). Typical use cases include real-time stock prices, live data feeds, trading applications.
- How do I use the RTD function? To use RTD, type =RTD( in a cell and provide the required arguments. Excel will show you the syntax and parameter hints as you type. Make sure to close the parentheses and press Enter to execute the function.
- Why is RTD not working in my Excel? Common issues with RTD include #N/A if server not available; Requires COM server registration. Start by checking the syntax =RTD(progID, server, topic1, [topic2], ...), then verify each referenced cell or range.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.