Enrollment for the FMVA™ Certification Program is now OPEN!

RTD Function

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

What is the RTD (Real Time Data) Function?

The RTD Function belongs to the 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) – It 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.

 

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 resources:

Free Excel Tutorial

To master the art of Excel, check out CFI's FREE Excel Crash Course, which teaches you how to become an Excel power user.  Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.  

Launch CFI’s Free Excel Course now to take your career to the next level and move up the ladder!