ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a row with 0 in column A (https://www.excelbanter.com/excel-programming/278546-deleting-row-0-column.html)

Steven R. Berke

Deleting a row with 0 in column A
 
In my worksheet Column A contains zeroes and other numbers with 0 in
them like 4500. I want to use a macro to delete those rows in column A
that just contain zeroes. There are other numbers in column A
containing 0 but these zeroes are part of at least a four digit number
Would you please help me write a macro to do this.

Bill Li

Deleting a row with 0 in column A
 
i=1
Do While cells(i,1)<""
s=trim(cstr(cells(i,1)))
if instr(s,"0") then
rows(i).delete
else
i=i+1
end if
Loop

-----Original Message-----
In my worksheet Column A contains zeroes and other

numbers with 0 in
them like 4500. I want to use a macro to delete those

rows in column A
that just contain zeroes. There are other numbers in

column A
containing 0 but these zeroes are part of at least a four

digit number
Would you please help me write a macro to do this.
.



All times are GMT +1. The time now is 11:27 AM.

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