Phone (01457) 858877 or email
This blog gives the various possible ways to select cells, ranges, columns and rows using Visual Basic for Applications in Excel. Useful for the VBA newbie, but even gurus might find one or two commands they'd missed!
This blog is part of our Excel macros online tutorial series. For real-world training, book onto our introductory or advanced VBA or Excel courses.
Finding myself with a bit of spare time, I thought I'd summarise the various ways to select cells using VBA within Excel.
I've also blogged on how to select cells relative to your starting point.
This entire blog works for Excel versions 2010, 2007, 2003 and older versions. You can try any of the examples contained it by downloading this Excel workbook.
If you're wondering at this stage what I mean by absolute and relative selection, here's an example:

Suppose you have the orange cell selected (Pooh Bear). You want to select Tigger. If you write a macro to:
The question to ask is: if I play the macro back again, does the cell it selects depend on my starting point?
I've divided the blog up into:
Enjoy!
This blog gives the various possible ways to select cells, ranges, columns and rows using Visual Basic for Applications in Excel. Useful for the VBA newbie, but even gurus might find one or two commands they'd missed!
This blog is part of our Excel macros online tutorial series. For real-world training, book onto our introductory or advanced VBA or Excel courses.
Comments on this blog
This blog currently has no comments.