LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Looking to select noncontiguous rows with For loop

I have the following code:

For i = 13 To (ZeroRow - 7) Step 8
.Rows(i).Select
Next
.Selection.Delete

What I'm trying to do is select ALL rows from 13 to (ZeroRow - 7) THEN
delete them all at once. With the code written the way it is only the very
last row selected will be deleted. How do I get a "hold the control button
and select multiple rows" kind of selection using VBA code?
 
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
Select noncontiguous multiple columns by column number? c mateland Excel Programming 8 October 22nd 06 12:23 PM
Noncontiguous rows KC8DCN Excel Discussion (Misc queries) 3 August 18th 06 05:34 AM
Specifying Range.Select in a loop MervB Excel Programming 5 November 10th 05 12:41 AM
How can I print noncontiguous rows on the same page? Mary A Walthall Excel Discussion (Misc queries) 1 April 26th 05 10:00 AM
How to select columns in loop Tom Ogilvy Excel Programming 1 January 18th 05 05:53 PM


All times are GMT +1. The time now is 08:31 AM.

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

About Us

"It's about Microsoft Excel"