How to Reference Cells and Ranges [Excel 2003 VBA Language Reference]

A common task when using Visual Basic is to specify a cell or range of cells and then do something with it, such as enter a formula or change the format. You can usually do this in one statement that identifies the range and also changes a property or applies a method.

A Range object in Visual Basic can be either a single cell or a range of cells. The following topics show the most common ways to identify and work with Range objects.

Which way do you want to reference cells?

Referring to cells and ranges using A1 notation

Referring to cells using index numbers

Referring to rows and columns

Referring to cells using shortcut notation

Referring to named ranges

Referring to cells relative to other cells

Referring to cells using a Range object

Referring to all the cells on the worksheet

Referring to multiple ranges