Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Is a cell in a range?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DesertCyclist - 28 Nov 2007 22:53 GMT
How can I find out if the ActiveCell is one of the cells in a named range? In
the SheetChange event, I want to take an action only if the cell that was
just changed (Target parameter?) belongs to a certain named range.

Thank you.
sebastienm - 28 Nov 2007 22:57 GMT
Hi,
Check whether or not the Intersection of these 2 ranges is nothing or not:

If Not Application(ActiveCell, Range( "<rangename>")) Is Nothing then
  ''' do something
End if
Signature

Regards,
Sébastien
<http://www.ondemandanalysis.com>

> How can I find out if the ActiveCell is one of the cells in a named range? In
> the SheetChange event, I want to take an action only if the cell that was
> just changed (Target parameter?) belongs to a certain named range.
>
> Thank you.
DesertCyclist - 29 Nov 2007 17:18 GMT
Thanks Sebastienm. I think you meant Intersect() and not Application(). This
is great. I didn't know about this. Thanks, again!

> Hi,
> Check whether or not the Intersection of these 2 ranges is nothing or not:
[quoted text clipped - 8 lines]
> >
> > Thank you.
sebastienm - 29 Nov 2007 17:28 GMT
Yes sorry: Application.Intersect
Xl also has an Application.Union that can also be very useful.
Signature

Regards,
Sébastien
<http://www.ondemandanalysis.com>

> Thanks Sebastienm. I think you meant Intersect() and not Application(). This
> is great. I didn't know about this. Thanks, again!
[quoted text clipped - 11 lines]
> > >
> > > Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.