Skip to main content

Use a Report Object Variable to Create a Named Range in an Excel Object

You can use a named range in an Excel object in CDM. When you use source and destination report object variables, you can create a named range in the worksheet of an Excel object and then use it to import the information in that range into a worksheet in another Excel object, or into a Word or PowerPoint object. You can also choose to include or exclude formatting.

The ability to use named ranges is useful when you have a range of information that would normally require a separate variable for each cell value in the Excel object.

To use a report object variable to create a named range in an Excel object:

  1. Open the report that you want to work with.
  2. Open and check out the Excel object in which you want to use a named range.
  3. Click the Section View Mode icon in the status bar.
  4. In the data worksheet, select the cell range that you want to define as a named range. The data worksheet is originally named Sheet1, but you can rename it if necessary.
  5. Click Formulas, then Define Name. The New Name window opens.
  6. Type the name of the range in the Name field, for example, AssetsRange, and click OK.
  7. In the same data worksheet where you added the named range, create a source object variable (##S) that tags the range. Set up the source variable in two columns:
    1. In the first column, enter the ##S variable as an identifier.
    2. In the second column, enter the name you used for the range you created, for example, AssetsRange.

    Important: Ensure that the variable name is outside of the display range, that is, not contained inside the ##RS and ##RE variables.

  8. Save your changes in the source Excel object.
  9. Click the Default View Mode icon in the status bar.
  10. Save your changes to the report and check in the source Excel object.

You can now use the source named range variable to import the information in that range into a worksheet in another Excel object, or into a Word or PowerPoint object.

Was this article helpful?

We're sorry to hear that.