selecting multiple ranges
Sub Tester3()
Dim rng As Range, C As Long
Dim F As Long
C = 3
F = 24
With Worksheets("Current Mth")
Set rng = .Range(.Cells(1, 1), .Cells(1, C - 1))
Set rng = Union(rng, .Range(.Cells(1, 22), .Cells(4, F - 2)))
End With
Debug.Print rng.Address(0, 0)
End Sub
produces
A1:B1,V1:V4
--
Regards,
Tom Ogilvy
"Helen" wrote in message
...
I am working on a project where I need to perform multiple actions on a
selection of multiple ranges.
I am currently using :
Worksheets("Current Mth").Range(Cells(1, 2), Cells(2, C - 1))
Can I use something similar to the Range("a1:b1.V1:v4") format?
|