View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Is Range Between two Ranges

Kevin,

In the event below,

Not Intersect(Target,Range(rgeStart,rgeEnd)) Is Nothing

will return TRUE if the Target is between rgeStart and rgeEnd.

HTH,
Bernie
MS Excel MVP

"Kevin McCartney" wrote in
message ...
I'd like to find if the selected cell is between two ranges, does anyone

know the required code.

Private Sub xlApp_SheetSelectionChange(ByVal Sh As Object, ByVal Target As

Range)
Dim rgeStart As Range, rgeEnd As Range

Set rgeStart = Sh.Range("B15")
Set rgeEnd = Sh.Cells.SpecialCells(xlCellTypeLastCell)

End Sub

TIA
KM