Stop searching. Start learning and developing your excel skills.
Macro
VBA
Formula
Function
Shortcut
Tricks

» » VBA to Select Cell from A Reference Cell

VBA to Select Cell from A Reference Cell

July 19, 2020 |
OFFSET

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