VBA - Selecting cells in relation

Post date: May 18, 2011 12:40:44 PM

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