View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Can VBA determine if a cell/range is in a group?

You can use the Intersect method to determine whether a cell is
in another range of cells. For example,

Dim Rng As Range
Set Rng = Range("A1")
If Not Application.Intersect(Rng, Range("A1:A10")) Is Nothing
Then
' Rng is in A1:A10
Else
' Rng is not in A1:A10
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"BlindGuardian"

wrote in message
news:BlindGuardian.1qf9yd_1118426712.4717@excelfor um-nospam.com...

I'd like to find if a selected cell is within a group. Is this
possible
from VBA?


--
BlindGuardian
------------------------------------------------------------------------
BlindGuardian's Profile:
http://www.excelforum.com/member.php...o&userid=24202
View this thread:
http://www.excelforum.com/showthread...hreadid=378137