How to use the RANGE.OFFSET property
The OFFSET property returns a Range object based on a row and column number. The image above shows a macro that uses cell E7 and applies an offset with 6 rows and 4 columns. The Msgbox displays the address of the Range object.
Excel Property Syntax
expression.Offset(RowOffset, ColumnOffset)
Arguments
expression | Required. Range object. |
RowOffset | Optional. How many rows the range object is to be offset. If omitted 0 (zero) is used. The argument may be a positive or negative value. |
ColumnOffset | Optional. How many columns the range object is to be offset. If omitted 0 (zero) is used. The argument may be a positive or negative value. |
Comments
It is possible to offset a cell range containing multiple cells as well. The image below demonstrates the OFFSET property with a ColumnOffset argument of -2.
More than 1300 Excel formulas
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form