Thread: range of cells
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default range of cells

Del,

You can use the Intersect method to determine if a cell is in
another range of cells. E.g.,

Dim Rng As Range
Set Rng = Range("C3")
If Not Application.Intersect(Rng, Range("A1:D4")) Is Nothing Then
Debug.Print "In Range"
Else
Debug.Print "Out of range"
End If


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



"del" wrote in message
...
how do you check if a cell falls under a a range of
cells. in other words, check if a cell is within a
particular range.
i tried using strcomp on the addresses but it didn't work.