Phone (01457) 858877 or email
This blog shows the various techniques within Excel Visual Basic for moving around and selecting cells relative to the active cell or selection. The blog includes a discussion of the Offset, End, Resize, Range, EntireRow, EntireColumn and CurrentRegion methods.
This blog is part of our Excel macros online tutorial series. Wise Owl also run VBA macros courses for beginners and advanced users.
Another blog has already explained how to select cells in absolute mode; this one shows how to select cells relative to your starting point. Examples of relative selection would be:
The VBA commands given in this blog work for Excel 2010, Excel 2007, Excel 2003 and (as far as I remember) Excel 2002, 2000 and 97 too!
If you want to try out any of the macros listed in this blog, you can download the file of Winnie the Pooh characters.
Before we begin, there are two keywords which you must understand in Excel Visual Basic for Applications (VBA): ActiveCell and Selection.

In this case:
Every worksheet has an active cell, and when only one cell is selected, the active cell and selection are the same thing.
Now that we've learnt about the two key Excel VBA concepts of ActiveCell and Selection, let's look at how you can move round a spreadsheet.
This blog shows the various techniques within Excel Visual Basic for moving around and selecting cells relative to the active cell or selection. The blog includes a discussion of the Offset, End, Resize, Range, EntireRow, EntireColumn and CurrentRegion methods.
This blog is part of our Excel macros online tutorial series. Wise Owl also run VBA macros courses for beginners and advanced users.
Comments on this blog
This blog currently has no comments.