R
robert.hatcher
I'm experimenting with the intersect method...
I need to locate two values, assign them to variables and then select
the intersection between the two.
I'm trying the following:
Sub IntersectTest()
Dim colRng, uclRng
Dim isect As Range
colRng = ActiveSheet.Cells.Find("DC_RES")
uclRng = ActiveSheet.Cells.Find("UCL")
Set isect = Application.Intersect(Range(colRng).EntireColumn,
(Range(uclRng).EntireRow))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If
End Sub
At the Set isect =... line I get:
Run time error : '1004'
Method 'Range' of 'object' Global Failed
Help! I've rewritten this as many ways as I can, to no avail.
I need to locate two values, assign them to variables and then select
the intersection between the two.
I'm trying the following:
Sub IntersectTest()
Dim colRng, uclRng
Dim isect As Range
colRng = ActiveSheet.Cells.Find("DC_RES")
uclRng = ActiveSheet.Cells.Find("UCL")
Set isect = Application.Intersect(Range(colRng).EntireColumn,
(Range(uclRng).EntireRow))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If
End Sub
At the Set isect =... line I get:
Run time error : '1004'
Method 'Range' of 'object' Global Failed
Help! I've rewritten this as many ways as I can, to no avail.