Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Luc Luc is offline
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
testing range of cells for part of cell content Daniel Excel Worksheet Functions 5 March 25th 10 08:14 PM
Check whether another sheet refers to cell in current RajenRajput1 Excel Discussion (Misc queries) 3 August 3rd 07 07:00 AM
Check box, then add current time to cell Joe Excel Worksheet Functions 5 January 9th 07 12:25 AM
How can I check a cell for current date and insert it if blank? Don K New Users to Excel 3 September 29th 06 02:46 PM
Is the active cell part of a named range Virginia Excel Programming 1 April 23rd 05 06:46 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"