Function InRange(Range1 As Range, Range2 As Range) As Boolean
Dim InterSectRange As Range
Set InterSectRange = Application.Intersect(Range1, Range2)
InRange = Not InterSectRange Is Nothing
Set InterSectRange = Nothing
End Function
Sub TestInRange()
If InRange(ActiveCell, Range("A1:A100")) Then
MsgBox "Active Cell In Range!"
Else
MsgBox "Active Cell NOT In Range!"
End If
End Subcitovat