Thread: intersect
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1234_] Rick Rothstein \(MVP - VB\)[_1234_] is offline
external usenet poster
 
Posts: 1
Default intersect

LOL

Note to self: You paid for a mouse with a scroll wheel... you should try
using the damn thing every now and then.

Rick


"Dave Peterson" wrote in message
...
Excellent point.

That's why I included this portion at the end:

You could also use:

If Intersect(ActiveCell, Union(rng1, rng2, rng3)) Is Nothing Then
MsgBox "Not in any of the 3 ranges!"
Else
MsgBox "activecell is in at least one of those ranges!"
End If

Or did you just copy that from my post??? <vbg

"Rick Rothstein (MVP - VB)" wrote:

If Intersect(ActiveCell, rng1) Is Nothing _
And Intersect(ActiveCell, rng2) Is Nothing _
And Intersect(ActiveCell, rng3) Is Nothing Then


I've not had much occasion to use these functions, but I'm guessing from
their help file write that the above could be replaced with this...

If Intersect(ActiveCell, Union(rng1, rng2, rng3)) Is Nothing Then

Rick


--

Dave Peterson