Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to write some code like,
If Activecell is part of range whatever then if true.... else If fales.... End if How do I say that? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how 'bout.........
Sub wheres_cell() Dim myRange As Range Dim c As Range Set myRange = Range("c2:c7") For Each c In myRange If ActiveCell.Address = c.Address Then MsgBox "I'm in the range :) " & c.Address Exit Sub Else 'do nothing End If Next c MsgBox "I'm not in the range :(" End Sub works for me. change to fit your ranges. susan On Jan 17, 3:55*pm, Aaron wrote: I want to write some code like, If Activecell is part of range whatever then if true.... else If fales.... End if How do I say that? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If intersect(activecell, range("a1:b99")) is nothing then
msgbox "not in a1:b99 else msbox "yes, I am!" end if Aaron wrote: I want to write some code like, If Activecell is part of range whatever then if true.... else If fales.... End if How do I say that? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clearly seeing active cell in a range | Excel Discussion (Misc queries) | |||
How to set active cell range to an variable | Excel Programming | |||
using a the active cell in a range command.... | Excel Programming | |||
Active cell as range | Excel Programming | |||
find range name for active cell | Excel Programming |