Leith,
Thank you for the reply. I edited the code to only go to the bottom of the filtered data. I get the same result. The code seems to be deleting the entire row, when I only want cells within my designated range to be deleted. Is this possible or does the code always default to entire rows in filter mode??
Private Sub DeleteZeroRows(ByVal wsheet As Worksheet)
Dim stripArrVar As Variant
Dim xArr As Variant
Dim firstRow As Long
Dim filterRng As Range
Dim lstfiltrow As Long
With wsheet
firstRow = .Range("HeaderRow").Row
stripArrVar = Array("AllA", "AllD", "AllH")
For Each xArr In stripArrVar
.AutoFilterMode = False
Set filterRng = .Range(.Cells(firstRow, .Range(xArr).Column - 4), .Cells(firstRow, .Range(xArr).Column + 2))
filterRng.AutoFilter Field:=5, Criteria1:=0
lstfiltrow = Cells(Rows.Count, .Range(xArr).Column).End(xlUp).Row
If lstfiltrow > firstRow Then
.Range(.Cells(firstRow + 1, .Range(xArr).Column - 4), .Cells(lstfiltrow, .Range(xArr).Column + 2)).SpecialCells(xlCellTypeVisible).Delete Shift:=xlUp
End If
Next xArr
.AutoFilterMode = False
End With
End Sub
Bookmarks