VBA Excel Range

In VBA Excel Range can be used in three basic ways.

The first way is to directly refer to the Range. For example...




or whatever Method or Property you choose.

When another Worksheet is active, you qualify the range with the Worksheet object. Either by Name...


or by its index...


And when another Workbook is active you qualify the Sheet with the Workbook. Either by Name...


or by its index...


Using the Cells Method


Would select the Cell or Range("B5")

You can also specify a range of more than one Cell...

Range(Cells(2,5), Cells(5,8))

Qualify the Range where needed as above.

Using the Cells Method is obviously much easier to use while looping though rows and columns of cells, since you can use the counters directly without converting the column to a letter(s) and the row to a string to look like "B5", for example.

Using the Offset Method

This is like using the Cells Method except that you choose which Cell your row and column numbers are Offsetting from instead of an imaginary Cell(0,0) in the upper left corner.


This would reference Cell "F6".

This site is powered by Site Build It!. If you enjoy it, please check out the
Site Build It homepage
 to learn more and on how to build a success-guaranteed site with no technical skills.

Custom Search

Return from VBA Excel Range to VBA Code Samples

Return to our Homepage