This documentation is archived and is not being maintained.

ResultRange Property [Excel 2003 VBA Language Reference]

Office 2003

Returns a Range object that represents the area of the worksheet occupied by the specified query table. Read-only.

Remarks

The range doesn't include the field name row or the row number column.

Example

This example sums the data in the first column of query table one. The sum of the first column is displayed below the data range.

Set c1 = Sheets("sheet1").QueryTables(1).ResultRange.Columns(1)
c1.Name = "Column1"
c1.End(xlDown).Offset(2, 0).Formula = "=sum(Column1)"
		


Applies to | QueryTable Object


Show: