Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Deleting alternative rows

I have region containing roughly 100 rows. I would like to create a macro
that deletes every other row within the region. I would like to start by
deleting row 2 & then continue to do so for the rest of the region.

Please advise.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Deleting alternative rows

try this
Sub deleteeveryotherrow()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -2
Rows(i).Delete
Next i
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Curt J" <Curt
wrote in message
...
I have region containing roughly 100 rows. I would like to create a macro
that deletes every other row within the region. I would like to start by
deleting row 2 & then continue to do so for the rest of the region.

Please advise.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Deleting alternative rows

Perfect, thanks for the help Don.

"Curt J" wrote:

I have region containing roughly 100 rows. I would like to create a macro
that deletes every other row within the region. I would like to start by
deleting row 2 & then continue to do so for the rest of the region.

Please advise.

Thanks

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
Coloring Alternative Rows only if data is there BetaDocuments New Users to Excel 4 January 6th 09 08:12 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
How to delete or copy alternative rows/columns at a time? Bhagavan Excel Discussion (Misc queries) 0 May 12th 08 07:31 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


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