View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Select Non Contigouos Ranges

Dim FoundDate As Range

Set FoundDate = Columns("A:A").Find(What:="Date", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:= False, SearchFormat:=False)
Set rng = Range(FoundDate.Offset(1, 0), FoundDate.End(xlDown))
Set rng = Union(rng, rng.Offset(0,4))
rng.Select

--
__________________________________
HTH

Bob

"LuisE" wrote in message
...
I'm sorry I misformulated my question.
I want those cells from Columns A and E and ignore the ones in between.

"Bob Phillips" wrote:

Range(FoundDate.Offset(1, 0), FoundDate.End(xlDown)).Resize(,2).Select


--
__________________________________
HTH

Bob

"LuisE" wrote in message
...
I need to select all the cells underneath a "found" cell in column A and
then
also the corresponding cells four columns to the right.

Here is what I have, it selects the entire range including columns in
between and an "Object Required" error.

Dim FoundDate As Range
Set FoundDate = Columns("A:A").Find(What:="Date", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:= False, SearchFormat:=False)
'.Activate

Union(Range(FoundDate.Offset(1, 0), Selection.End(xlDown)).Select,
Range(FoundDate.Offset(0, 4), Selection.End(xlDown)).Select).Copy


I also struggle to understand set, object required dilema, any
reference
in
plain English?

Thanks in advance