Worksheet.Range (Excel)

Returns a Range object that represents a cell or a range of cells.

Cell1 and Cell2 can be A1-style references in the language of the macro. The range references can include the range operator (a colon), intersection operator (a space), or union operator (a comma). They can also include dollar signs, which are ignored. A local defined name can be a range reference. If you use a name, the name is assumed to be in the language of the macro. Cell1 and Cell2 can be Range objects that contain a single cell, column, row, or any other range of cells. Often, Cell1 and Cell2 are single cells in the upper-left and lower-right corners of the range returned. When used without an object qualifier, this property is a shortcut for ActiveSheet.Range (it returns a range from the active sheet; if the active sheet isn't a worksheet, the property fails). When applied to a Range object, the property is relative to the Range object. For example, if the selection is cell C3, Selection.Range("B1") returns cell D3 because it is relative to the Range object returned by the Selection property. On the other hand, the code ActiveSheet.Range("B1") always returns cell B1.

Range (Cell1, Cell2)

Worksheets("Sheet1").Range("A1").Value = 3.14159

Arguments

The following argument is required

Cell1 (Range) - A String that is a range reference when one argument is used. Either a String that is a range reference or a Range object when two arguments are used.

The following argument is optional

Cell2 (Range) - Either a String that is a range reference or a Range object. Cell2 defines another extremity of the range returned by the property.