JoeyGaspard
Board Regular
- Joined
- Jul 22, 2019
- Messages
- 147
Hi All, I am trying to autofilter a table, delete the filtered rows, then turn the autofilter off to show the remaining data. My filter works all the way up to showing the data again, the data is there, but it doesnt show. I have read that you have to autofilter tables differently, but I am unable to get it to work, below is the code I am using, it works fine as long as its not in a table, thanks in advance for any help!
'Clean up GrowthRate
With Sheets("GrowthRate")
.AutoFilterMode = False
With .Range("k2", .Range("k" & Rows.Count).End(xlUp))
.AutoFilter 11, "0"
On Error Resume Next
Range("a2:j2", Range("a2:j2").End(xlDown)).SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
.AutoFilterMode = False
End With
'Clean up GrowthRate
With Sheets("GrowthRate")
.AutoFilterMode = False
With .Range("k2", .Range("k" & Rows.Count).End(xlUp))
.AutoFilter 11, "0"
On Error Resume Next
Range("a2:j2", Range("a2:j2").End(xlDown)).SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
.AutoFilterMode = False
End With