RTD Function

Gets real-time data from a program that supports COM automation

Over 1.8 million professionals use CFI to learn accounting, financial analysis, modeling and more. Start with a free account to explore 20+ always-free courses and hundreds of finance templates and cheat sheets.

What is the RTD (Real Time Data) Function?

The RTD Function[1] belongs to the Excel Lookup and Reference category. The function will retrieve real time data from a program that supports COM automation.

As a financial analyst, the RTD function is very useful, as it helps in refreshing values from real-time data servers in Excel spreadsheets. As a financial analyst, we can use cell values as formula arguments and build powerful refreshable data sheets and models in a few minutes.

Formula for Real Time Data

=RTD(ProgID, server, topic1, [topic2], …)

The RTD function uses the following arguments:

  1. ProgID (required argument) – The name of the ProgID of a registered COM automation add-in installed on the local computer. We need to enclose the name in quotation marks.
  2. Server (required argument) – This is the name of the server where the add-in should be run. If there is no server and the program is run locally, we leave the argument blank. Otherwise, we need to enter quotation marks (“”) around the server name. When using RTD within Visual Basic for Applications (VBA), double quotation marks or the VBA NullString property is required for the server, even if the server is running locally.
  3. Topic1, topic2, … –  Topic1 is required argument, however, the subsequent topics are optional. 1 to 253 parameters that together represent a unique piece of real time data.

How to use the RTD Function in Excel?

To understand the uses of the Real-Time Data RTD function, let us consider a few examples:

Real-Time Data Example 1

Suppose we wish to build the Excel sheet below:

RTD Function

If we wish to retrieve information from Yahoo! Finance, we can do that using the RTD function. The formula to use will be:

=RTD(“progid”,,”YahooFinanceWatchList”,”AAPL”,”Open”)

While developing this formula we need to remember that:

  1. The RTD COM automation add-in must be installed and registered on the computer.
  2. No RTD servers are shipped with Microsoft Office, so we must manually install a real-time data server if we wish to use the function.
  3. The “progID” must be enclosed in quotation marks.
  4. The “server” must be enclosed in quotation marks.
  5. If the real-time data server is being run locally, leave the “server” argument blank.
  6. The function will only continuously update when the calculation mode is set to automatic.
  7. When using RTD within Visual Basic for Applications (VBA), double quotation marks or the VBA NullString property is required for the server, even if the server is running locally.

A few notes about the RTD Function:

  1. N/A! error – RTD servers should be digitally signed. If an RTD server is not digitally signed, the server may not load, and a #N/A error will be displayed in the cell(s) referencing the RTD server.

Click here to download the sample Excel file

Additional Resources

Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial modeling. To learn more, check out these additional CFI resources:

Article Sources

  1. RTD Function
0 search results for ‘