Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default identifying range

Hi,
I want to check whether the ActiveCell is within a specific range. so when
using the Change function I would know whether to handle it or not.
How can I check if the target cell or the ActiveCell is within a certain
range?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default identifying range

Use the Intersect function.

Steve



"Yossi" wrote in message
...
Hi,
I want to check whether the ActiveCell is within a specific range. so when
using the Change function I would know whether to handle it or not.
How can I check if the target cell or the ActiveCell is within a certain
range?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default identifying range

This kind of thing checks for changes to exactly one cell in A1:B99.


If target.cells.count 1 then exit sub
if intersect(target,me.range("a1:B99")) is nothing then exit sub

'your code to do the work

Yossi wrote:

Hi,
I want to check whether the ActiveCell is within a specific range. so when
using the Change function I would know whether to handle it or not.
How can I check if the target cell or the ActiveCell is within a certain
range?


--

Dave Peterson
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
Identifying duplicate values in a range Paul Excel Discussion (Misc queries) 1 May 3rd 09 10:31 PM
Identifying when all values in a range are the same. MichaelZ Excel Discussion (Misc queries) 7 December 11th 08 08:42 PM
Identifying a Selected Range in a Macro DCSwearingen Excel Discussion (Misc queries) 4 April 25th 06 04:01 PM
vba, identifying a range Danny Excel Worksheet Functions 1 August 2nd 05 08:17 PM
Identifying Overlapping Dates within a range Tremain Excel Worksheet Functions 1 May 9th 05 10:55 PM


All times are GMT +1. The time now is 01:02 PM.

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

About Us

"It's about Microsoft Excel"