ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   deleting 2 rows (https://www.excelbanter.com/excel-programming/321941-deleting-2-rows.html)

Tomek[_7_]

deleting 2 rows
 
Hello,

I wonder how to delete 2 rows if there is zero value in the first row?
I know how to delete one row with zero value but I do not know how to
delete to rows.
There are many rows with values. If there is a row with zero value I want
to delete the row with zero value and next row with whatever value.
I have several thousands rows.

example
A
1
5
0 DELETE
2 DELETE
2
2
0 DELETE
5 DELETE

Thank you very much in advance for help

Tomek


Tom Ogilvy

deleting 2 rows
 
Use the resize method

activecell.Resize(2).EntireRow.delete

--
Regards,
Tom Ogilvy

"Tomek" wrote in message
.. .
Hello,

I wonder how to delete 2 rows if there is zero value in the first row?
I know how to delete one row with zero value but I do not know how to
delete to rows.
There are many rows with values. If there is a row with zero value I want
to delete the row with zero value and next row with whatever value.
I have several thousands rows.

example
A
1
5
0 DELETE
2 DELETE
2
2
0 DELETE
5 DELETE

Thank you very much in advance for help

Tomek




Tomek[_7_]

deleting 2 rows
 
Dnia Sat, 29 Jan 2005 12:18:50 -0500, Tom Ogilvy napisał(a):

Use the resize method

activecell.Resize(2).EntireRow.delete



Thank you very much , it really works!

Tomek


All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com