![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com