Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim Isect As Range
Set Isect = Application.Intersect(Range1, Range2) If isect is nothing then Do this Else Do that End if Lars Kofod -----Original 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 . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I test for nulls within a range without specifying each ce | Excel Discussion (Misc queries) | |||
Test within a range? | Excel Worksheet Functions | |||
Test if CELL is in RANGE | Excel Worksheet Functions | |||
logical test for each and every cell in range | Excel Discussion (Misc queries) | |||
logical test - within a range | Excel Worksheet Functions |