View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default How to verify a cell is in a named range

One way:


Dim bSameSheet As Boolean
Dim bInRange As Boolean

With Range("TimeCells")
bSameSheet = .Parent Is ActiveSheet
If bSameSheet Then bInRange = _
Not Intersect(.Cells, ActiveCell) Is Nothing
End With

In article ,
"Terry Lowe" wrote:

I give up. I have been trying to figure this out but I can only get half of
it. I think I need "professional help"!

I have a range name "TimeCells". I need to write an IF statement to verify
that the activecell is within the bounds of the named range. Also I need to
verify that I am on the correct worksheet.

Any help would be greatly appreciated.