Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Sub HKiller()
  2. For i = 451 To 12 Step -1
  3. If Cells(i, "H").Value = 0 Then Rows(i).Delete
  4. Next i
  5. End Sub
  6.  
  7. Sub test()
  8. Dim Lastrow As Long, i As Long
  9. 'LastColumn = .Cells(1, .Columns.Count).End(xlToLeft).Column
  10.  
  11. With ThisWorkbook.Worksheets("Sheet1")
  12.  
  13. Lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
  14.  
  15. For i = 0 To Lastrow Step 1
  16. If Cells(i, "E" Or "F").Value = 0 Then Rows(i).Delete
  17. Lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
  18. Next i
  19. End With
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement