Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
A ROWS by any other name...
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 -- Gary''s Student - gsnu200820 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
A ROWS by any other name...
Range("1:3").Select
? ;-) On 12 Gru, 17:32, Gary''s Student wrote: 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 -- Gary''s Student - gsnu200820 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
A ROWS by any other name...
Just as unwieldy, but what I use
Union(Rows(1), Rows(3), Rows(5)).Select -- __________________________________ HTH Bob "Gary''s Student" wrote in message ... 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 -- Gary''s Student - gsnu200820 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
A ROWS by any other name...
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. "Gary''s Student" wrote: 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 -- Gary''s Student - gsnu200820 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
A ROWS by any other name...
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. "Gary''s Student" wrote: 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 -- Gary''s Student - gsnu200820 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
A ROWS by any other name...
Here is a way to do that...
Range("1:1,3:3,7:7").Select Note the number-colon-number ranges. -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... 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 -- Gary''s Student - gsnu200820 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
colating multi rows of data into single rows - no to pivot tables! | Excel Worksheet Functions | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. | Excel Programming | |||
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows | Excel Programming | |||
Copy rows of data (eliminating blank rows) from fixed layout | Excel Discussion (Misc queries) |