Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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!! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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!! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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!! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you both! I love this message board.
"Ron de Bruin" wrote: 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!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
highlight activecell | Excel Discussion (Misc queries) | |||
Activecell, not for cell,but for range? | Excel Discussion (Misc queries) | |||
activecell & Vlookup | Excel Discussion (Misc queries) | |||
Activecell problem | Excel Discussion (Misc queries) | |||
ActiveCell.Copy Range("R3C27") | New Users to Excel |