VBA Range / Cell Address

Get Range Address

This will display the cell address using the Range object:

vba range cell address

Get Cells Address

This will display the cell address using the Cells object:

ActiveCell Address

To get the ActiveCell address use this code:

Set Variable to Cell Address

You can also assign the cell address to a string variable:

 

Get Row Number From Cell Address

This code will extract the row number from an address:

However, usually you can use this much simpler code:

 

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)