test dbl click 'target' is part of named range

  • Thread starter Thread starter David
  • Start date Start date
D

David

Thanks in advance
What is the usual code for testing if an individual cell belongs to a named
range?
 
Use Intersect Method

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top