I have to generate a report from time to time and write code to filter for blanks in column I and delete all the entries containing blanks, then unfilter. I wrote code to find the last row and last column and then do the filtering/un-filtering. It all works until the un-filtering part (the last line). How do I unfilter my table, which now has new dimensions, aka new values for finalRow and finalColumn (and thus rng as well)?

Sub Macro4()
Dim finalRow As Long
finalRow = Range("A" & Rows.Count).End(xlUp).Row
Dim finalColumn As Integer
finalColumn = Cells(1, Columns.Count).End(xlToLeft).Column
Dim rng As Range
Set rng = Range(Cells(finalRow, 1), Cells(finalRow, finalColumn))


rng.AutoFilter Field:=9, Criteria1:="="
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select

rng.AutoFilter Field:=9


End Sub