Hi
I've recorded a macro which filters blanks in a sheet.
However, I need to modify it, so that it deletes the blanks from the range in the sheet regardless of the number of rows.
Does anyone know how to modify the code below, please? Also, is there a good tutorial on VBA autofilters that you would recommend, so that I can see how to modify these myself?
TIA
I've recorded a macro which filters blanks in a sheet.
However, I need to modify it, so that it deletes the blanks from the range in the sheet regardless of the number of rows.
Does anyone know how to modify the code below, please? Also, is there a good tutorial on VBA autofilters that you would recommend, so that I can see how to modify these myself?
TIA
Code:
Sub Autofilter()'
Rows("1:1").Select
Selection.Autofilter
ActiveSheet.Range("$A$1:$D$145").Autofilter Field:=1, Criteria1:="="
Rows("40:40").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$D$112").Autofilter Field:=1
ActiveSheet.AutoFilterMode = False
End Sub