Sub FAR()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets.Add
ActiveSheet.Name = "FAR"
Sheets.Add
ActiveSheet.Name = "FARFinal"
With Sheets("JE")
.Activate
.Rows("1:1").Copy Destination:=Sheets("FARFinal").Rows("1:1")
.Rows("1:1").Find(What:="PERIOD", SearchOrder:=xlByRows).EntireColumn.Copy Destination:=Sheets("FAR").Range("A1")
.Rows("1:1").Find(What:="REF", SearchOrder:=xlByRows).EntireColumn.Copy Destination:=Sheets("FAR").Range("B1")
.Rows("1:1").Find(What:="ENTITYID", SearchOrder:=xlByRows).EntireColumn.Copy Destination:=Sheets("FAR").Range("C1")
.Rows("1:1").Find(What:="ACCTNUM", SearchOrder:=xlByRows).EntireColumn.Copy Destination:=Sheets("FAR").Range("D1")
.Rows("1:1").Find(What:="AMT", SearchOrder:=xlByRows).EntireColumn.Copy Destination:=Sheets("FAR").Range("E1")
End With
LastRow = Sheets("FAR").Range("A1").End(xlDown).Row
Sheets("FAR").Activate
Sheets("FAR").Range("A1").End(xlToRight).Offset(0, 1) = "Special"
Sheets("FAR").Range("A1").End(xlToRight).Offset(1, 0).Resize(LastRow - 1, 1).FormulaR1C1 = "=RC[-5]&RC[-4]&RC[-3]"
Sheets("FAR").Cells(2, 6).Resize(LastRow, 1).Formula = Sheets("FAR").Cells(2, 6).Resize(LastRow, 1).Value
Sheets("FAR").Range("A1").End(xlToRight).Offset(0, 1) = "Type"
Sheets("FAR").Range("A1").End(xlToRight).Offset(1, 0).Resize(LastRow - 1, 1).FormulaR1C1 = "=if((Left(Mid(RC[-3],3,500),2)+0>=15)*(Left(Mid(RC[-3],3,500),2)+0<=17),""FA"",if(Left(Mid(RC[-3],3,500),1)+0>=4,""IS"",""Error""))"
MyDataRange = Sheets("FAR").Range("A1").CurrentRegion.Address
Sheets("FAR").Range("A1").AutoFilter Field:=7, Criteria1:="=Error"
MsgBox Format(Now - StartTime, "hh:mm:ss")
StartTime = Now
'Beg************this part takes 4:21*************
StarterCell = 2
Increment = 8000
For Cycle = 1 To Round(LastRow / Increment, 0)
StarterCell = Range(Cells(StarterCell, 1), Cells(StarterCell + Increment, 1)).SpecialCells(xlCellTypeVisible)(1).Row
Range(Cells(StarterCell, 5), Cells(StarterCell + Increment, 5)).SpecialCells(xlCellTypeVisible).EntireRow.Delete
Next Cycle
'End************this part takes 4:21*************
MsgBox Format(Now - StartTime, "hh:mm:ss")
StartTime = Now
'************Remaining Code Below*************
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub