A ROWS by any other name...

G

Gary''s Student

I would like to select several rows in one shot

Rows("1:3").Select works just fine to select
rows 1 thru 3
Rows("1,3,7").Select fails to select the three
required rows
Range("A1,A3,A7").EntireRow.Select works, but looks a little clumsy
 
J

JLGWhiz

Don't know why the Rows("1, 3, 5") don't work. It allows Union(Rows(1),
Rows(2), Rows(3)) or as you pointed out, you can specify a range of cells
with EntireRow and it will acknowledge the selection. The type mismatch is a
clue, but I am not smart enough to interpret what it really means.
 
J

JLGWhiz

P.S. the fact that Rows is a property that can return a range object rather
than being a range object might have something to do with it.
 
R

Rick Rothstein

Here is a way to do that...

Range("1:1,3:3,7:7").Select

Note the number-colon-number ranges.
 
Top