You are on page 1of 1

Sub Macro1()

'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+Shift+Q
'
Range("A1").Select
ActiveCell.Offset(0, 3).Columns("A:A").EntireColumn.Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(0, 3).Columns("A:E").EntireColumn.Select
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(0, 1).Columns("A:A").EntireColumn.Select
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(0, -2).Columns("A:A").EntireColumn.EntireColumn.AutoFit
ActiveCell.Offset(0, -2).Columns("A:A").EntireColumn.Select
ActiveWorkbook.Worksheets(Worksheets.Count).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(Worksheets.Count).Sort.SortFields.Add
Key:=ActiveCell, _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets(Worksheets.Count).Sort
.SetRange ActiveCell.Offset(0, -5).Range("A1:H32")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Dim x As Long
For x = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(x, 6).Value = "Deposits" Then
Cells(x, 8).Interior.Color = vbYellow
End If
Next x
Range("P1").Value = "Total Paidout"
Range("O1").Value = WorksheetFunction.SumIf(Range("F1:F30"), "PaidOuts -
05/19/2019", Range("H1:H30"))
Cells(1, 1).Select

End Sub

You might also like