I need a Macro that will look for 0 in column A and delete the row. I then need that to loop to do the same on all work sheets. I've been trawling the net for ages and can't come up with anything. Can anyone help please?
For Each sh In ActiveWorkbook.Sheets
For i = [a65000].End(xlUp).Row To 1 Step -1
If Cells(i, 1) = "0" Then Rows(i).Delete shift:=xlUp
I prefer to filter and delete, rather than looping. It's generally quicker, as long as you disable calculation first.
Dim Rng As Range
Dim Sht As Worksheet
Application.Calculation = xlCalculationManual
For Each Sht In ActiveWorkbook.Sheets
Set Rng = Range("A1").CurrentRegion
Rng.AutoFilter Field:=1, Criteria1:="0"
Set Rng = Nothing
Application.Calculation = xlCalculationAutomatic