excel vba‎ > ‎

VBA - Selecting cells in relation

posted May 18, 2011, 5:40 AM by Roberto Felicini

Selecting cells in relation to one another can be done in a couple of ways. The most effective, in my experience, is to use the ActiveCell.Offset(Rows,Columns).Select method. Here are a couple of examples for relational movement:

ActiveCell.Offset(1,0).Select
 'Selects cell in same Column, 1 Row DOWN

ActiveCell.Offset(-1,0).Select
'Selects cell in same Column, 1 Row UP

ActiveCell.Offset(0,2).Select
'Selects cell in same Row, 2 Columns RIGHT

ActiveCell.Offset(0,-2).Select
'Selects cell in same Row, 2 Columns LEFT
Comments