Public Sub Masterlist()
Dim LR As Long, i As Long
Range("A:A, C:F, I:L, O:T, W:Y, AA:AD").Delete
Application.ScreenUpdating = False
With ActiveSheet
.AutoFilterMode = False
With Range("H1", Range("H" & Rows.Count).End(xlUp))
.AutoFilter 1, "Y"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With Sheets("Sheet1")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With .Range("G" & i)
If .Value = "" Then .EntireRow.Cut Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End With
Next i
On Error Resume Next
.Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End With
Columns("C:C").Select
Selection.Copy
Columns("O:O").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.TextToColumns Destination:=Range("O1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=":", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
Columns("P:P").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("O:O").Select
Selection.TextToColumns Destination:=Range("O1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, OtherChar _
:=":", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
Cells.Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range( _
"O2:O14926"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A1:AE14926")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Set rng = Range("O2:O" & Cells _
(Rows.Count, 1).End(xlUp).Row)
'Set rng = ActiveSheet.UsedRange
For Each cell In rng
s = cell.Text
Select Case s
Case "Not"
cell.Value = "X"
Case "FND"
cell.Value = "X"
Case "Other"
cell.Value = "X"
Case "CAN"
cell.Value = "X"
Case "DLR"
cell.Value = "X"
Case "ABF"
cell.Value = "X"
Case "CCF"
cell.Value = "X"
Case "RAU"
cell.Value = "X"
Case "MVR"
cell.Value = "X"
Columns("P:P").Delete
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Cancel Automatic Payment Plan for 'A' deal Acct. due to MELLON BANK rejected on C03 Unable to locate account. MELLONachr100303"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Beacon Score Not Fundable or Rule Not Found"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "CANCELLED Requests"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Contract Approved but Has Other Paperwork Issues"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Contract Completed - Not Fundable"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Contract is Cancelled"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Failed Paperwork"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Failed paperwork or QA"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Paperwork Approved but Failed QA"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Paperwork Approved but No Contact (13 days not elapsed since cut-in)"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Paperwork Approved but QA in Process"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
With ActiveSheet
.AutoFilterMode = False
With Range("P1", Range("P" & Rows.Count).End(xlUp))
.AutoFilter 1, "Paperwork Approved but QA in Process"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
End Select
Next cell
On Error Resume Next
End Sub