title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Range.End property (Excel) |
vbaxl10.chm144121 |
|
|
d46d75c9-b152-e93d-82c3-f59f0e7f69da |
05/10/2019 |
high |
Returns a Range object that represents the cell at the end of the region that contains the source range. Equivalent to pressing END+UP ARROW, END+DOWN ARROW, END+LEFT ARROW, or END+RIGHT ARROW. Read-only Range object.
expression.End (Direction)
expression A variable that represents a Range object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Direction | Required | XlDirection | The direction in which to move. |
This example selects the cell at the top of column B in the region that contains cell B4.
Range("B4").End(xlUp).Select
This example selects the cell at the end of row 4 in the region that contains cell B4.
Range("B4").End(xlToRight).Select
This example extends the selection from cell B4 to the last cell in row four that contains data.
Worksheets("Sheet1").Activate
Range("B4", Range("B4").End(xlToRight)).Select
[!includeSupport and feedback]