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: 10
Default Macro to delete 2 rows every 500 rows

I have a bunch of files that I would like to delete 2 rows every
99rows (basically there is information I don't need every 99rows after
the first 100 rows...or 101 with the headers). I have "recorded" a
macro for this, but I thought there would be a better way, as the
number of rows is different for each file. Is there a way to do this,
since I don't have a constant number of rows in each sheet?

Rows("102:103").Select
Selection.Delete Shift:=xlUp
Rows("201:202").Select
Selection.Delete Shift:=xlUp

etc....

As I said, I recorded this manually, but there has to be a better way!
 
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
Macro to delete rows wilko Excel Discussion (Misc queries) 3 July 23rd 09 08:13 PM
Macro to delete rows Hankjam[_2_] Excel Discussion (Misc queries) 4 October 1st 08 03:58 PM
Macro to delete Rows 1, 3 and 10 Rashid Khan Excel Programming 2 June 28th 04 04:03 PM
Macro to delete rows Melanie Breden Excel Programming 2 May 10th 04 11:16 PM


All times are GMT +1. The time now is 07:23 PM.

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"