Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test to see if a cell is within a range
What is the best way to define a range and then use it to test to see if a
cell is within that range? Something like ... dim rngMine as range set rngMine = range("$D$3", "$D$4", "$E$3:$F$41") If activecell.address in rngMine then ... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test to see if a cell is within a range
Hi
have a look at intersect for this -- Regards Frank Kabel Frankfurt, Germany "Tim Coddington" schrieb im Newsbeitrag ... What is the best way to define a range and then use it to test to see if a cell is within that range? Something like ... dim rngMine as range set rngMine = range("$D$3", "$D$4", "$E$3:$F$41") If activecell.address in rngMine then ... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test to see if a cell is within a range
Tim ,
You won't be able to set the range like that Dim rngMine As Range Set rngMine = Range("$D$3, $D$4, $E$3:$F$41") If Not Intersect(ActiveCell, rngMine) Is Nothing Then MsgBox "found" End If -- HTH RP (remove nothere from the email address if mailing direct) "Tim Coddington" wrote in message ... What is the best way to define a range and then use it to test to see if a cell is within that range? Something like ... dim rngMine as range set rngMine = range("$D$3", "$D$4", "$E$3:$F$41") If activecell.address in rngMine then ... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test to see if a cell is within a range - Thanks
Thanks for the help!
"Bob Phillips" wrote in message ... Tim , You won't be able to set the range like that Dim rngMine As Range Set rngMine = Range("$D$3, $D$4, $E$3:$F$41") If Not Intersect(ActiveCell, rngMine) Is Nothing Then MsgBox "found" End If -- HTH RP (remove nothere from the email address if mailing direct) "Tim Coddington" wrote in message ... What is the best way to define a range and then use it to test to see if a cell is within that range? Something like ... dim rngMine as range set rngMine = range("$D$3", "$D$4", "$E$3:$F$41") If activecell.address in rngMine then ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Test if CELL is in RANGE | Excel Worksheet Functions | |||
logical test for each and every cell in range | Excel Discussion (Misc queries) | |||
== How to test if a range var contains nothing | Excel Programming | |||
Test if Active Cell is in a named range | Excel Programming | |||
Test if Cell is within Range (name) | Excel Programming |