Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Links and Linking in Excel | |||
Macro for deleting rows and serialising the remaing rows | Setting up and Configuration of Excel | |||
Macro for deleting rows and serialising the remaing rows | Excel Worksheet Functions | |||
Help!! I have problem deleting 2500 rows of filtered rows!!!! | Excel Discussion (Misc queries) | |||
deleting hidden rows so i can print only the rows showing?????? | Excel Worksheet Functions |