'VBA How to select a range of rows relative to active cell?
In VBA, I want to select a range of rows relative to the active cell. For example, select rows +3 to +5 relative to the active cell. I tried the following without success:
Rows(ActiveCell.Row+3:ActiveCell.Row+5).Select
Solution 1:[1]
Sub ActiveCellNewRange()
Dim rngArea As Range
'set new range
Set rngArea = Sheet1.Range("C5").Offset(3).EntireRow.Resize(5)
'Select and write to immeadiate window
rngArea.Select
Debug.Print rngArea.Address
End Sub
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user18083442 |
