Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i check if the current cell is part of a range ?
Lets say a that i have named some cells TABLE
How do i check if the current cell is in the range with the name TABLE? Thanxxxx Luc |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i check if the current cell is part of a range ?
Luc,
Try some code like the following: If Not Application.Intersect(ActiveCell, Range("Table")) Is Nothing Then Debug.Print "In Table" Else Debug.Print "Not in table" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Luc" wrote in message t... Lets say a that i have named some cells TABLE How do i check if the current cell is in the range with the name TABLE? Thanxxxx Luc |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i check if the current cell is part of a range ?
One way:
If Not Intersect(ActiveCell, Range("TABLE")) Is Nothing Then MsgBox "In TABLE" Else MsgBox "Not in TABLE" End If In article , "Luc" wrote: Lets say a that i have named some cells TABLE How do i check if the current cell is in the range with the name TABLE? Thanxxxx Luc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
testing range of cells for part of cell content | Excel Worksheet Functions | |||
Check whether another sheet refers to cell in current | Excel Discussion (Misc queries) | |||
Check box, then add current time to cell | Excel Worksheet Functions | |||
How can I check a cell for current date and insert it if blank? | New Users to Excel | |||
Is the active cell part of a named range | Excel Programming |