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: 7
Default deleting variable number of rows

I hava a sheet with more than 1000 rows and the problem is that only
every 13th row contains information I want to have. So I want to
delete the rest of the rows. I have been trying this with

Sub Macro1()

Rows("10:23").Select
Selection.Delete Shift:=xlUp
End Sub

and it works fine but I want to do this automatically. Is there a way
to make the row selection (Rows("10:23") automatical? I tried this
with a counter like
Rows(a & ":" & b) with a and b being values of the counter but it
doesn't work. Any sugestions?
 
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
Deleting a range of rows based on a variable; syntax error Babymech Excel Discussion (Misc queries) 3 January 16th 09 06:19 PM
deleting number and alphabet rows and coluns Maryann Excel Discussion (Misc queries) 1 May 17th 08 05:12 PM
deleting number and alphabet columns and rows. Maryann Excel Discussion (Misc queries) 1 May 17th 08 09:52 AM
Sequential number - adding and deleting rows Suzan Excel Discussion (Misc queries) 2 January 4th 06 09:36 PM
deleting a variable number of columns Rob Barnard Excel Programming 2 July 28th 03 07:04 PM


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