View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Umlas[_3_] Bob Umlas[_3_] is offline
external usenet poster
 
Posts: 320
Default Test if Cell is within Range (name)

If Application.Intersect(Range("TESTRANGE"),Range("D4 ")) is Nothing then
msgbox "Does not intersect"
Else
msgbox "Intersects"
End If

Bob Umlas
Excel MVP

"goepf" wrote in message
...

I have a dynamic range (meaning the size will change) that is defined
with a name. How can I easily test if an active cell is within that
range?

Thanks,

'expl:

'Range B2:Z15 (name "TESTRANGE")

'ActiveCell D4

'Test if D4 is within "TESTRANGE"


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements