Lookup & reference function

RTD function

Receives live data from a real-time data (RTD) server program, such as a broker's price feed, and updates the cell as new values arrive.

Available in Excel 2002 and later for Windows, Microsoft 365 for Windows; not available in Excel for the web or Excel for Mac

In every Excel versionNot in Google Sheets

Syntax

RTD(prog_id, server, topic1, [topic2], ...)
ArgumentWhat it means
prog_idRequiredThe registered name (ProgID) of the RTD server add-in installed on the computer, in quotes, e.g. "MyBroker.RtdServer".
serverRequiredThe name of the machine running the server. Use "" (or leave it empty) when the server runs on your own computer.
topic1, topic2, ...RequiredUp to 253 text values that tell the server what you want, e.g. a ticker and a field name. Their meaning is defined by the server's documentation.

Returns: The latest value sent by the RTD server for the requested topics. It changes automatically as the server pushes updates.

How RTD works

RTD connects a cell to a program that streams data - typically a trading platform, a market data terminal, a factory sensor system or a custom in-house tool. Instead of you refreshing a query, the server pushes new numbers to Excel whenever they change, and every cell with an RTD formula updates on its own. Excel itself does not ship any data feed; RTD only works when a vendor or your IT team has installed an RTD server (a COM add-in) on your machine.

You identify the server by its ProgID, say which computer it runs on (usually empty for the local machine) and then pass one or more topics: text values the server understands, such as a ticker symbol and a field like "Last" or "Bid". The server's documentation tells you which topics exist. Excel throttles screen updates (by default to about every two seconds) so a fast feed does not freeze the workbook; you can change this through Application.RTD.ThrottleInterval in VBA.

Because the values come from outside Excel, the result cannot be checked against the sheet - the numbers below are illustrations of what a feed might send.

Examples

1Live last price from a broker feed

B2fx=RTD("MyBroker.RtdServer", , A2, "Last")
AB
1TickerLast price
2MSFTThe latest price sent by the server, e.g. 415.32

Result: The latest price sent by the server, e.g. 415.32

The formula asks the locally installed MyBroker.RtdServer for the field Last of the ticker in A2. The cell shows whatever price the server last pushed and keeps updating while the server runs.

2Several fields from the same feed

C2fx=RTD("MyBroker.RtdServer", "", A2, B2)
ABC
1TickerFieldValue
2MSFTBidThe current bid sent by the server, e.g. 415.30
3MSFTAsk

Result: The current bid sent by the server, e.g. 415.30

Topics can come from cells, so one formula copied down C2:C3 requests the bid and then the ask. Each cell subscribes to its own topic pair.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 13 KB

Common errors and how to fix them

ErrorWhy it happensFix
#N/AThe RTD server is not installed or registered, the ProgID is misspelled, or the server cannot be started.Install the vendor's add-in, check the exact ProgID in its documentation, and make sure it runs on the same bitness (32/64-bit) as Excel.
#N/AThe server is running but does not recognise the topics.Check the topic names and their order with the data provider.

Tips

  • Some vendors provide their own wrapper functions that call RTD for you; use those if available.
  • Keep RTD formulas on a dedicated sheet and reference them elsewhere to make updates easier to manage.
  • If values seem to update slowly, ask whether the throttle interval has been changed or calculation is set to manual.

Google Sheets

No COM real-time data servers; use GOOGLEFINANCE, IMPORTDATA or an Apps Script trigger for live data.

RTD in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DutchRTG
HungarianVIA
ItalianDATITEMPOREALE
PolishDANE.CZASU.RZECZ
RussianДРВ
SpanishRDTR
TurkishGZV