Name
range
.End([Direction
])
Synopsis
Returns a Range
object that represents the cell at the end a region of cells containing the specified range, in the specified direction. The following code selects the cell at the bottom end of the region containing cell A2:
Dim r As Range Set r = ActiveSheet.Range("A2") r.End(xlDown).Select
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.