Excel - RTD Function



RTD Function

The Excel RTD function extracts the real-time data from a program supporting COM automation. It is categorized under the Lookup and Reference Function in Excel. This function uses the COM technology to fetch the data from the server. This powerful function is used in the stock market data and statistical data where values are updated automatically from the real-time data server.

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the RTD function is as follows −

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

Arguments

You can use the following arguments with the RTD function −

Argument Description Required/ Optional
ProgID It specifies the ProgID name of a registered COM automation add-in which must be enclosed in double quotation. Required
Server

It specify the server name where add in to be run.

The execution of the program is done locally, if no server is unavailable.

Else, use the double quotes ("") surround the server's name.

The VBA NullString property/Double quotation marks to be required for the server whenever you use the RTD inside VBA.

Required
Topic1, topic2, ... Topic1 is mandatory, while other topics are optional. A distinctive piece of real time data is denoted by the 1-253 parameters. Topic1 Required Other Topics Optional

Points to Remember

  • The RTD COM automation add-in is not generated and registered on a local computer then the RTD function will retrieve the #N/A error.
  • The RTD formulas would change when automatic calculation mode to be selected in the Microsoft Excel if the server is configured to update the results continuously,

Example of RTD Function

Practice the following example to learn the use of the RTD function in Excel.

What does the RTD Function do in Excel?

In this example, we will apply the RTD function to the respective cell where the specific program id is to be supplied in the first argument.

Solution

Deliberate a new excel worksheet, place the cursor on the B2 cell and double click on it and enter the formula =RTD("mycomaddin.progid",,"Server_name","Report") in the C3 cell.

What does the RTD Function do in Excel1

After that, hit the Enter tab to get the result.

What does the RTD Function do in Excel2

Download Practice Sheet

You can download and use the sample data sheet to practice the RTD function.

Advertisements