View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default ActiveCell in a Range?

Sub InRange()
If Not Intersect(ActiveCell, Range("A1:E77")) Is Nothing Then
MsgBox "In Range"
End If
End Sub

Regards

Trevor


"Filo" wrote in message
...
Hello-
I am trying to program a certain action if the activecell is inside a
certain range, and a different action if it is outside. How can I receive
some signal as to whether the activecell is within a certain range?
Below is a rough code description of what I am trying to do


If activecell is inside Range(A1:E77) then
...
else
....

Please let me know if you would need more information. Thank you!!