Hi all,

I have the code below which should find the last populated row and delete everything below it. Essentially I have 5 formatted pages of cells populated with vlookups - to allow anything from 1 to 350 results to display after importing a file.

Once I've imported the file, the VBA below should delete all the rows which have not been populated. The only other point is I have an initial page header of 13 rows.

Sub Filter_and_Delete_Filtered_Rows()

    Range("A13:A300").Select
    Selection.AutoFilter
    ActiveSheet.Range("A13:A300").AutoFilter Field:=1, Criteria1:="=0", _
        Operator:=xlOr, Criteria2:="="
    Cells.Select
    Selection.Delete Shift:=xlUp
End Sub
It does delete all the blank rows after my data, but it also deletes the first 13 rows?

Any ideas anyone?

Many thanks in advance!