checoturco
Registered User.
- Local time
- Yesterday, 22:21
- Joined
- Oct 17, 2005
- Messages
- 76
hi all,
i have a code to delete a row if a cell has a 0(zero) value, this is the code:
For i = 1 To 1000
If .Cells(i, "E").Value = 0 Then
.EntireRow(i).Delete
enf if
next
what happens it´s that if i had 2 cells with 0, i.e.
cell(1E)=0
cell(2E)=0
it delete the row cell(1E) and don´t delete row with cell(2E) because this cell becames cell(1E) and next loop goes to next cell.
somebody has any idea to fix this?
tks
i have a code to delete a row if a cell has a 0(zero) value, this is the code:
For i = 1 To 1000
If .Cells(i, "E").Value = 0 Then
.EntireRow(i).Delete
enf if
next
what happens it´s that if i had 2 cells with 0, i.e.
cell(1E)=0
cell(2E)=0
it delete the row cell(1E) and don´t delete row with cell(2E) because this cell becames cell(1E) and next loop goes to next cell.
somebody has any idea to fix this?
tks