Sub
test()
Dim
AnzahlDaten
As
String
Dim
strSpA, strSpG, strSpH, strBer
As
String
Sheets(
"Basis"
).
Select
AnzahlDaten = Range(
"A65535"
).
End
(xlUp).Row
Sheets(
"Basis"
).Range(Cells(2, 1), Cells(AnzahlDaten, 8)).Name =
"Daten"
strBer =
"Daten"
strSpA =
"A"
strSpG =
"G"
strSpH =
"H"
Application.AddCustomList ListArray:=Array(
"H"
,
"A"
,
"B"
)
With
Basis
Range(strBer).Sort Key1:=Range(strSpA & 1 & AnzahlDaten), Order1:=xlAscending, _
key2:=Range(strSpH & 1 & AnzahlDaten), OrderCustom:=Application.CustomListCount + 1, _
key3:=Range(strSpG & 1 & AnzahlDaten), Order3:=xlDescending, Header:=xlYes
End
With
Application.DeleteCustomList Application.CustomListCount
End
Sub