Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default ROWS Property question

The following works:
Worksheets("Sheet1").Rows(5).Select

But if I want to select multiple nonadjacent rows how can I do that?
Worksheets("Sheet1").Rows(5,3,1).Select gives an error, quotes don't
work.
I could do this with Range but I'm curious if its possible with Rows.
Thanks for the help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default ROWS Property question

Hi TC,

Try:

Worksheets("Sheet1"). Range("5:5,3:3,1:1").Select


---
Regards,
Norman



"TC" wrote in message
...
The following works:
Worksheets("Sheet1").Rows(5).Select

But if I want to select multiple nonadjacent rows how can I do that?
Worksheets("Sheet1").Rows(5,3,1).Select gives an error, quotes don't
work.
I could do this with Range but I'm curious if its possible with Rows.
Thanks for the help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default ROWS Property question

One way:
Worksheets("sheet1").Range("a5,a3,a1").EntireRow.S elect

Remember that you have to be on Sheet1 to select a range on sheet1.

And you can do most things without changing the selection.


TC wrote:

The following works:
Worksheets("Sheet1").Rows(5).Select

But if I want to select multiple nonadjacent rows how can I do that?
Worksheets("Sheet1").Rows(5,3,1).Select gives an error, quotes don't
work.
I could do this with Range but I'm curious if its possible with Rows.
Thanks for the help


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default ROWS Property question

Hi TC,

Using the Rows property (which I didn't):

With Sheets("Sheet1")
.Activate
Union(.Rows(5), .Rows(3), .Rows(1)).Select
End With

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi TC,

Try:

Worksheets("Sheet1"). Range("5:5,3:3,1:1").Select


---
Regards,
Norman



"TC" wrote in message
...
The following works:
Worksheets("Sheet1").Rows(5).Select

But if I want to select multiple nonadjacent rows how can I do that?
Worksheets("Sheet1").Rows(5,3,1).Select gives an error, quotes don't
work.
I could do this with Range but I'm curious if its possible with Rows.
Thanks for the help





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default ROWS Property question

Thanks Norman

Tim

On Sat, 18 Sep 2004 00:09:46 +0100, "Norman Jones"
wrote:

Hi TC,

Using the Rows property (which I didn't):

With Sheets("Sheet1")
.Activate
Union(.Rows(5), .Rows(3), .Rows(1)).Select
End With

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi TC,

Try:

Worksheets("Sheet1"). Range("5:5,3:3,1:1").Select


---
Regards,
Norman



"TC" wrote in message
...
The following works:
Worksheets("Sheet1").Rows(5).Select

But if I want to select multiple nonadjacent rows how can I do that?
Worksheets("Sheet1").Rows(5,3,1).Select gives an error, quotes don't
work.
I could do this with Range but I'm curious if its possible with Rows.
Thanks for the help





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
Is there a Filename property in PrintOut property Christian[_6_] Excel Programming 4 September 3rd 04 10:12 PM
VBA Question: going through rows in a sheet via vba Mariam[_3_] Excel Programming 1 June 24th 04 11:15 PM
Property question Eric Bentzen Excel Programming 1 August 5th 03 05:34 PM
Question about "End(xlUp)" property Dave Peterson[_3_] Excel Programming 1 August 4th 03 04:24 AM
Question about "End(xlUp)" property Chip Pearson Excel Programming 0 August 4th 03 02:57 AM


All times are GMT +1. The time now is 04:32 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"