View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Cell is a Member of a range or Not

Your subject says cell implying a single cell, while your prose says address
which could mean multiple cells. If a single cell, intersect would work
fine. If multiple cells, intersect would not be definitive depending on
your definition of member - if member means a subset, the multiple cells and
and subset would be problematic for intersect. Union would be more
appropriate in this case.

if Union(Range(namedrange),Range(address)).address =
range(namedrange).address then

--
Regards,
Tom Ogilvy

"pgjoshi " wrote in message
...
I have defined a named range. I want to use VBA Code to know whether a
particular address from sheet is a member of the defined named range or
not ?

Thanks in advance.

Prasad Joshi


---
Message posted from http://www.ExcelForum.com/