Hi All,
I am trying to loop through a list and if "Cash" is found in Column B then from cell A to H of that row is deleted (then shifted up)
This code will work but deletes the entire row which is not what I am after, any help would be much appreciated!
Sub DeleteCash()
Last = Cells(rows.Count, "B").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "B").value) = "CASH" Then
Cells(i, "B").EntireRow.Delete
End If
Next i
End Sub
I am trying to loop through a list and if "Cash" is found in Column B then from cell A to H of that row is deleted (then shifted up)
This code will work but deletes the entire row which is not what I am after, any help would be much appreciated!
Sub DeleteCash()
Last = Cells(rows.Count, "B").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "B").value) = "CASH" Then
Cells(i, "B").EntireRow.Delete
End If
Next i
End Sub