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:
- 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.
- 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.
- 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:
If we wish to retrieve information from Yahoo! Finance, we can do that using the RTD function. The formula to use will be:
While developing this formula we need to remember that:
- The RTD COM automation add-in must be installed and registered on the computer.
- 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.
- The “progID” must be enclosed in quotation marks.
- The “server” must be enclosed in quotation marks.
- If the real time data server is being run locally, leave the “server” argument blank.
- The function will only continuously update when the calculation mode is set to automatic.
- 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:
- 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.
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: