Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 896
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
colating multi rows of data into single rows - no to pivot tables! UKMAN Excel Worksheet Functions 4 March 12th 10 04:11 PM
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. Conan Kelly Excel Programming 1 November 16th 07 10:41 PM
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows Corey Excel Programming 2 August 1st 07 02:02 AM
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 13th 07 11:05 PM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"