R
ric
Is there a way to increase a range in a loop?
So "A1:Z5" would become "A6:Z10".
Regards
Ric
So "A1:Z5" would become "A6:Z10".
Regards
Ric
Bob Phillips said:Something like
Dim myRange As Range
Dim i As Long
Set myRange = Range("A1:Z5")
For i = 1 To 5
Set myRange = myRange.Offset(1, 0)
'...
Next
but you can just as easily set it afetr with
Dim myRange As Range
Dim i As Long
Set myRange = Range("A1:Z5")
For i = 1 To 5
Set myRange = myRange.Offset(1, 0)
'...
Next
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
Tom Ogilvy said:Sub Tester11()
Dim rng As Range, rng1 as Range
Dim i as Long
Set rng = Range("A1:Z5")
For i = 1 To 5
Set rng1 = rng.Offset((i - 1) * 5, 0)
MsgBox rng1.Address
Next
End Sub