Hello Guys!
Help me speed up my code please.
I need to remove rows that contains specific pair of values in columns L and M.
80 and 1, 80 and 01, 80 and 03, 80 and 10 (01 and 1 are different - its all TEXT)
ex.
<tbody>
</tbody>
My working code is :
This code works fine but the trick is that I have over 1.000.000 records and can it be done faster with better code??
Best Regards
W.
Help me speed up my code please.
I need to remove rows that contains specific pair of values in columns L and M.
80 and 1, 80 and 01, 80 and 03, 80 and 10 (01 and 1 are different - its all TEXT)
ex.
L | M |
80 | 01 |
80 | 03 |
80 | 10 |
80 | 1 |
<tbody>
</tbody>
My working code is :
Code:
Dim Fil As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Fil = Range("A" & Rows.count).End(xlUp).row
With Range("A1:N" & Fil)
.AutoFilter
.AutoFilter field:=12, Criteria1:="80"
.AutoFilter field:=13, Criteria1:=Array( _
"01", "03", "1", "10"), Operator:=xlFilterValues
.Offset(1, 0).SpecialCells(xlCellTypeVisible).Rows.Delete
End With
Selection.AutoFilter
Application.DisplayAlerts = True
Application.ScreenUpdating = True
This code works fine but the trick is that I have over 1.000.000 records and can it be done faster with better code??
Best Regards
W.