I am trying to delete columns when column T,U,V has 0 value at the same row. However, the code that i am using only deletes some of them and as shown below, there are still 0s at column T,U,V for some rows even though I already specify them to be deleted at specific cells that i have assigned. Which part of my code have i done wrong?
Dim j As Long
Dim lr As Long
lr = Sheets(1).Cells(Rows.Count, "U").End(xlUp).Row
For j = 1 To lr
If Sheets(1).Cells(j, 21).Value = 0 And Sheets(1).Cells(j, 22).Value = 0 And Sheets(1).Cells(j, 23).Value = 0 Then
Sheets(1).Range("T" & j & ":W" & j).Delete
j = j + 1
End If
Next
After applying my code, there are still left overs rows with zeros.
so eventually i want it to be