Dim List As Variant
Dim lr As Long
Dim r As Long
Range("A1:V3").Select
selection.EntireRow.Delete
Cells.Select
With selection.Font
.Name = "Times New Roman"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
List = Array("Cash Movement")
lr = Range("C" & Rows.Count).End(xlUp).Row
For r = lr To 2 Step -1
If IsError(Application.Match(Range("C" & r).Value, List, False)) Then
Rows(r).Delete
End If
Next r
Range("A:A,C:C,D:D,G:G,H:H,J:J").Select
Range("J1").Activate
Range("A:A,C:C,D:D,G:G,H:H,J:J,K:K,L:L,O:V").Select
Range("O1").Activate
selection.Delete Shift:=xlToLeft
Cells.Select
Cells.EntireColumn.AutoFit
Columns("F:F").Select
selection.Style = "Currency"
Cells.Select
ActiveWorkbook.Worksheets("Sheet0").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet0").Sort.SortFields.Add Key:=Range("B2:B36") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet0").Sort.SortFields.Add Key:=Range("A2:A36") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet0").Sort
.SetRange Range("A1:V36")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Rows("1:1").Select
selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
selection.Font.Size = 11
selection.Font.Size = 12
selection.Font.Size = 14
selection.Font.Size = 16
Dim lr As Long
Dim r As Long
Dim sr As Long
Dim sc As String
'***************************************************
' Specifiy the column you wish to apply this to
sc = "B"
' Specify first row of data
sr = 2
'***************************************************
Application.ScreenUpdating = False
' Find last row with data
lr = Cells(Rows.Count, sc).End(xlUp).Row
' Loop through all rows backwards
For r = lr To (sr + 1) Step -1
' Insert row if cell is different than cell above
If Cells(r, sc) <> Cells(r - 1, sc) Then Rows(r).Insert
Next r
Application.ScreenUpdating = True
End Sub