My Question: I am trying to delete rows in a table in column `AH` and Criteria is "Del" so any cell in column `AH`, I want to delete entire row in that table.

I tried so many different codes and most take forever as I have 10000+ rows to delete. I found this code from a site, but I am getting an error `subscript out of range Error9` from the `If Intersect` line:

```
Private Sub deleteTableRowsBasedOnCriteria(tbl As ListObject, _
                                           columnName As String, _
                                           criteria As String)

    Dim x As Long, lastrow As Long, lr As ListRow
    lastrow = tbl.ListRows.Count
    For x = lastrow To 1 Step -1
        Set lr = tbl.ListRows(x)
        If Intersect(lr.Range, tbl.ListColumns(columnName).Range).Value = criteria Then
            'lr.Range.Select
            lr.Delete
        End If
    Next x
End Sub

```

Then I called the sub as below:

```
Set tbl = ThisWorkbook.Worksheets("Sheet1").ListObjects("Table4")
Call deleteTableRowsBasedOnCriteria(tbl, "AH", "Del")

```

Any help would be great. Thank you.