View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default ActiveCell in a Range?

You can use intersect

If Not Application.Intersect(Range("A1:E77"), ActiveCell) Is Nothing Then
MsgBox "In the range"
Else
MsgBox "not in the range"
End If


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"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!!