ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   test dbl click 'target' is part of named range (https://www.excelbanter.com/excel-programming/417257-test-dbl-click-target-part-named-range.html)

David

test dbl click 'target' is part of named range
 
Thanks in advance
What is the usual code for testing if an individual cell belongs to a named
range?

joel

test dbl click 'target' is part of 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


"David" wrote:

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



All times are GMT +1. The time now is 08:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com