Sub Makro1()
' Makro1 Makro
Dim DWKST, DWSTEK, DWJahr, DWMonth, DWPENR, ZZ1, spaltenzahl As Integer
spaltenanzahl = ActiveSheet.Cells(4, Columns.Count).End(xlToLeft).Column
For ZZ1 = 1 To spaltenanzahl
Cells(4, ZZ1).Select
If Trim(UCase(ActiveCell.Value)) = UCase("Month") Then DMonth = ZZ1
If Trim(UCase(ActiveCell.Value)) = UCase("Monat") Then DWMonth = ZZ1
Next
i = ActiveSheet.UsedRange.Rows.Count
Rows("A5:" & i - 1).Select '
ActiveWorkbook.Worksheets("general_report").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("general_report").Sort.SortFields.Add Key:=Range( _
DWMonth & "5:" & DWMonth & i - 1), SortOn:=xlSortOnValues, Order:= _
xlAscending, CustomOrder:= _
"January,February,March,April,May,June,July,August,September,October,November,December" _
_
_
, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("general_report").Sort
.SetRange Range("A5:U" & i - 1)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub