Sub SortDataByAcctCode()
'
' SortDataByAcctCode Macro
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Range("A1:Z1").AutoFilter
ActiveWindow.SmallScroll ToRight:=3
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("H1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
.Range("A1:Z1").AutoFilter
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
Sub SortID()
'
' SortID Macro
'
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Columns("A:A").Select
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("A2:A2254"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
Sub SortID()
'
' SortID Macro
'
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Columns("A:A").Select
.Range("A1:Z1").AutoFilter
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("A2:A2254"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
.AutoFilter.sort.SortFields.Clear
line Sub SortDataByDate()
'
' SortDataByDate Macro
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Range("A1:Z1").AutoFilter
ActiveWindow.SmallScroll ToRight:=3
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("I1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
.Range("A1:Z1").AutoFilter
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
Sub SortDataByCompany()
'
' SortDataByCompany Macro
'
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Range("A1:Z1").AutoFilter
ActiveWindow.SmallScroll ToRight:=3
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("B1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
.Range("A1:Z1").AutoFilter
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
Sub SortDataByAcctCode()
'
' SortDataByAcctCode Macro
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Range("A1:Z1").AutoFilter
ActiveWindow.SmallScroll ToRight:=3
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("H1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
.Range("A1:Z1").AutoFilter
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
Sub SortID()
'
' SortID Macro
'
Application.ScreenUpdating = False
Sheets("Expenses").Visible = True
With Sheets("Expenses")
.Columns("A:A").Select
.Range("A:A").AutoFilter
.AutoFilter.sort.SortFields.Clear
.AutoFilter.sort.SortFields.Add Key:= _
.Range("A2:A2254"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With .AutoFilter.sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
Sheets("Expenses").Visible = False
Application.ScreenUpdating = True
End Sub
Open in new window