Perhaps adopt an approach along the lines of:
Sub Example()
Dim vExceptions As Variant, vData As Variant
Dim lngData As Long
Dim xlCalc As XlCalculation
On Error GoTo Handler
With Application
xlCalc = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
.enablevents = False
End With
vExceptions = Array("A", "B", "C", "D", "E", "F", "G", "I", "J")
With Sheets("Sheet1")
With .Range(.Cells(1, "X"), .Cells(.Rows.Count, "X").End(xlUp))
vData = Application.Transpose(.Value)
For lngData = LBound(vData) To UBound(vData) Step 1
If Not IsNumeric(Application.Match(vData(lngData), vExceptions, 0)) Then
vData(lngData) = "#DIV/0!"
End If
Next lngData
.Value = Application.Transpose(vData)
On Error Resume Next
.SpecialCells(xlCellTypeConstants, xlErrors).EntireRow.Delete
On Error GoTo Handler
End With
End With
ExitPoint:
With Application
.Calculation = xlCalc
.ScreenUpdating = True
.enablevents = True
End With
Exit Sub
Handler:
MsgBox "Error Has Occurred" & vbLf & vbLf & _
"Error Number: " & Err.Number & vbLf & vbLf & _
"Error Desc.: " & Err.Description, _
vbCritical, _
"Fatal Error"
Resume ExitPoint
End Sub
modify sheet name as per own requirements (set as Sheet1 in the above)
vExceptions should hold those values that are to be kept.
the above should be pretty quick to run.
Bookmarks