The OFFSET function returns a cell that is a specified number of rows and/or columns from the reference cell.
The Syntax
OFFSET (number of rows to move UP/DOWN, number of columns to move RIGHT/LEFT)
Example
Range("A1").Offset(1, 0).Select
Means move one row down from cell A1. The cell selected will now be A2.
Range("A1").Offset(0, 1).Select
Means move one column right to cell A1. The cell selected will now be B1.
Range("A1").Offset(1, 1).Select
Means move one column right and one row down from cell A1. The cell selected will now be B2.
No comments:
Post a Comment