Option Explicit
Sub ACM()
Dim CloseRow As Long, LastRow As Long, AccRow As Long
Dim Closings As Worksheet, Accruals As Worksheet
Dim Titell, AccNum, LSNL, Principle, Income, CUSIP 'Represent Headers on Closing Accounts Sheet
Set Closings = Closings
Set Accruals = Accruals
LastRow = Closings.Cells(Rows.Count, 4).End(xlUp).Row + 1
CloseRow = 1
AccRow = 2
With Accruals
Titell = Right(.Cells(1, "C").Value, 9) 'Titell(sic) To avoid Keywords
AccNum = Right(.Cells(1, "D").Value, 9)
LSNL = Right(.Cells(1, "E").Value, 9)
Principle = Right(.Cells(1, "F").Value, 9)
Income = Right(.Cells(1, "G").Value, 9)
CUSIP = Right(.Cells(1, "H").Value, 9)
'Transpose Headers to Column K 'Not really used anywhehere in this version
.Cells(2, "K").Value = Titell
.Cells(3, "K").Value = AccNum
.Cells(4, "K").Value = LSNL
.Cells(5, "K").Value = Principle
.Cells(6, "K").Value = Income
.Cells(7, "K").Value = CUSIP
Do Until CloseRow = LastRow
If Closings.Cells(CloseRow, "E").Value = "A1" And (Closings.Cells(CloseRow, "I").Value > 0 And Closings.Cells(CloseRow, "I").Value < 25) Then
.Cells(AccRow, "A").Value = Closings.Cells(CloseRow, "D").Value
.Cells(AccRow, "I").Value = Closings.Cells(CloseRow, "H").Value
Select Case .Cells(AccRow, "I").Value
Case Is = Titell: .Cells(AccRow, "C").Value = Closings.Cells(CloseRow, "I").Value
Case Is = AccNum: .Cells(AccRow, "D").Value = Closings.Cells(CloseRow, "I").Value
Case Is = LSNL: .Cells(AccRow, "E").Value = Closings.Cells(CloseRow, "I").Value
Case Is = Principle: .Cells(AccRow, "F").Value = Closings.Cells(CloseRow, "I").Value
Case Is = Income: .Cells(AccRow, "G").Value = Closings.Cells(CloseRow, "I").Value
Case Is = CUSIP: .Cells(AccRow, "H").Value = Closings.Cells(CloseRow, "I").Value
End Select
End If
AccRow = AccRow + 1
CloseRow = CloseRow + 1
Loop
.Range("I:K").Delete
End With
End Sub