Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intersecting Ranges 1

Status
Not open for further replies.

logius

Programmer
Aug 30, 2001
175
US
Hey, guys. Anyone know of a way to check if two named ranges intersect? I could run a cell-by-cell check, but I'm looking for a more efficient approach. Any ideas?
 

Dear logius,

try the intersect method of the application object.
(Found in online help after searching for intersect) LOL


Set isect = Application.Intersect(Range("rg1"), Range("rg2"))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If

regards Astrid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top