Any thoughts on what is killing me performance-wise here, and what could I do instead? It's taking a good two minutes to run the below code block. The worksheet called "BSEV" has about 54000 rows, for reference. I'm guessing that it's either RemoveDuplicates or the row-deleting loop. What could I do instead?
With AllSubj
.Range(.Cells(1, 1), .Cells(BSEVLRow - 1, 2)).Value = _
BSEV.Range(BSEV.Cells(BSEVFRow, 3), BSEV.Cells(BSEVLRow, 4)).Value
.Range(.Cells(1, 1), .Cells(BSEVLRow - 1, 2)).RemoveDuplicates 1, xlNo
AllSubjLRow = .Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
DCSubjLRow = AllSubjLRow
For i = AllSubjLRow To 1 Step -1
If .Cells(i, 2).Value <> "Active in Core" Then
.Rows(i).EntireRow.Delete
End If
Next i
AllSubjLRow = .Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
AllSubjArr() = .Range(.Cells(1, 1), .Cells(AllSubjLRow, 1)).Value
End With