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


Hi,

I need a code that deletes all the odd/even rows in a sheet.

10X !


--
yaniv_av
------------------------------------------------------------------------
yaniv_av's Profile: http://www.excelforum.com/member.php...o&userid=26558
View this thread: http://www.excelforum.com/showthread...hreadid=398317

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default deleting rows


Delete All Even Numbered Rows (#DelEvenRows)
http://www.mvps.org/dmcritchie/excel/delempty.htm

Perhaps this could be done without a loop but here is one way.

Sub DelEvenRows()
'David McRitchie 2002-03-11 misc
'Delete Even numbered rows from the bottom
Application.ScreenUpdating = False
Dim ix As Long
For ix = Cells.SpecialCells(xlLastCell).Row To 2 Step -1
If ix Mod 2 = 0 Then Rows(ix).Delete
Next ix
Application.ScreenUpdating = True
End Sub


--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"yaniv_av" wrote in message
...

Hi,

I need a code that deletes all the odd/even rows in a sheet.

10X !


--
yaniv_av
------------------------------------------------------------------------
yaniv_av's Profile: http://www.excelforum.com/member.php...o&userid=26558
View this thread: http://www.excelforum.com/showthread...hreadid=398317



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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 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 06:59 AM.

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"