E
EJ
Sub DeleteRows()
Dim i As Long, LastRow As Long
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, 6) >= 0 Then Rows(i).Delete
Next
End Sub
I would like to get some help with this macro. Currently it is deleting
more rows than I want it to delete. I would like it to
Look at each row in Column A.
If the row in Column A has contents in it than check the same row of Column
F.
If the contents in Column F are equal to or greater than “0†delete the row
and keep deleting the rows below it until Column A has contents in it again.
Repeat for every row in Column A and Column F.
Dim i As Long, LastRow As Long
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, 6) >= 0 Then Rows(i).Delete
Next
End Sub
I would like to get some help with this macro. Currently it is deleting
more rows than I want it to delete. I would like it to
Look at each row in Column A.
If the row in Column A has contents in it than check the same row of Column
F.
If the contents in Column F are equal to or greater than “0†delete the row
and keep deleting the rows below it until Column A has contents in it again.
Repeat for every row in Column A and Column F.