Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if ActiveCell is within a certain named range
I have a range named "RangePriority". When I click in a cell in the
worksheet how can I test to see if it is within the range "RangePriority". I guess it the testing would occur in: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Code Here to Test ActiveCell End Sub Thank you for your help. Steven |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if ActiveCell is within a certain named range
if intersect(Target, Range("RangePriority") then
do something end if HTH -- AP "Steven" a écrit dans le message de ... I have a range named "RangePriority". When I click in a cell in the worksheet how can I test to see if it is within the range "RangePriority". I guess it the testing would occur in: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Code Here to Test ActiveCell End Sub Thank you for your help. Steven |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if ActiveCell is within a certain named range
Hi Steven,
Try: '============= Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Range("RangePriority"), Target) Is Nothing Then MsgBox Target.Address(0, 0) _ & " intersects with the RangePriority range" End If End Sub '<<============= --- Regards, Norman "Steven" wrote in message ... I have a range named "RangePriority". When I click in a cell in the worksheet how can I test to see if it is within the range "RangePriority". I guess it the testing would occur in: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Code Here to Test ActiveCell End Sub Thank you for your help. Steven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Produce the name of the named range of activecell | Excel Programming | |||
How to get name of named range where activecell is | Excel Programming | |||
Copy named range contents to activecell position | Excel Programming | |||
Finding if the activecell is withing a named range | Excel Programming | |||
easy way to test if a Named Range exists | Excel Programming |