#1   Report Post  
Posted to microsoft.public.excel.misc
kotlon
 
Posts: n/a
Default Delete every 3rd row


Can this be done quickly? For example you have 300 rows and you wanna
delete 1,4,7,10 etc...?


--
kotlon
------------------------------------------------------------------------
kotlon's Profile: http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000

  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Delete every 3rd row

a backwards looping macro something like

Sub deleteeverythridrow()
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -2
Rows(i).Delete
Next i

End Sub
--
Don Guillett
SalesAid Software

"kotlon" wrote in
message ...

Can this be done quickly? For example you have 300 rows and you wanna
delete 1,4,7,10 etc...?


--
kotlon
------------------------------------------------------------------------
kotlon's Profile:
http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000



  #3   Report Post  
Posted to microsoft.public.excel.misc
Nikki
 
Posts: n/a
Default Delete every 3rd row

if you don't mind sorting:
what if in a column X you type:
1
2
3
copy and paste it to the end, and then sort by the column, you can then
delete all rows with 3 in column x.

"kotlon" wrote:


Can this be done quickly? For example you have 300 rows and you wanna
delete 1,4,7,10 etc...?


--
kotlon
------------------------------------------------------------------------
kotlon's Profile: http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000


  #4   Report Post  
Posted to microsoft.public.excel.misc
kotlon
 
Posts: n/a
Default Delete every 3rd row


You are genious


--
kotlon
------------------------------------------------------------------------
kotlon's Profile: http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000

  #5   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Delete every 3rd row

Did you even try my solution?

--
Don Guillett
SalesAid Software

"kotlon" wrote in
message ...

You are genious


--
kotlon
------------------------------------------------------------------------
kotlon's Profile:
http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000





  #6   Report Post  
Posted to microsoft.public.excel.misc
Nikki
 
Posts: n/a
Default Delete every 3rd row

I'm glad it worked for you.

"kotlon" wrote:


You are genious


--
kotlon
------------------------------------------------------------------------
kotlon's Profile: http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000


  #7   Report Post  
Posted to microsoft.public.excel.misc
kotlon
 
Posts: n/a
Default Delete every 3rd row


Don Guillett, yes I have tried your solution and it worked, but I could
not understand the logic behind the script and when I need to delete
every 2+3+4th row for example I am unable to. Thank you


--
kotlon
------------------------------------------------------------------------
kotlon's Profile: http://www.excelforum.com/member.php...o&userid=35431
View this thread: http://www.excelforum.com/showthread...hreadid=552000

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
I can't delete a cell without deleting a row Tenny Excel Discussion (Misc queries) 2 June 30th 06 12:52 AM
Macro to delete a group of CELLS Excel Discussion (Misc queries) 4 May 8th 06 04:29 PM
in workbook, where is delete worksheet Teressa Excel Worksheet Functions 5 January 19th 06 11:46 PM
how do I delete a worksheet from my workbook DLee New Users to Excel 2 August 15th 05 09:59 PM
Delete row depending on criteria adw223 Excel Discussion (Misc queries) 1 June 30th 05 12:55 AM


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