Item Property

Applies To

Chart object.

Description

Returns a Range object that represents a range that's offset from the specified range. Read-only.

Syntax 1

expression.Item(RowIndex, ColumnIndex)

Syntax 2

expression.Item(RowIndex)

expression Required. An expression that returns a Range object.

RowIndex Syntax 1: Required Variant. The row number of the cell you want to work with (the first row in the range is 1).

Syntax 2: Required Variant. The index number of the cell you want to work with, counting from left to right and from top to bottom. Range.Item(1) returns the cell in the upper-left corner of the range; Range.Item(2) returns the cell immediately to the right of this cell.

ColumnIndex Optional Variant. A number or string that indicates the column number of the cell you want to work with (the first column in the range is either 1 or A).

Remarks

Syntax 1 uses a row number and either a column number or a letter as index arguments. For more information about this syntax, see the Range object. The RowIndex and ColumnIndex arguments are relative offsets. In other words, specifying 1 for RowIndex returns cells in the first row in the range, not the first row on the datasheet.

Example

This example clears cell B2 on the datasheet.

myChart.Application.DataSheet.Range("A1").Item(2, 2).Clear