Gruppe
Allgemein
Problem
Spalte A soll so sortiert werden, dass Ä als Ae angesehen wird und Sch vor S kommt.
StandardModule: basMain
Sub Sortieren()
With Columns("A")
.Replace What:="Ä", _
Replacement:="Ae", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=True
.Replace _
What:="Sch", _
Replacement:="Rxx", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=True
.Sort _
Key1:=Range("A2"), _
Order1:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
.Replace _
What:="Rxx", _
Replacement:="Sch", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=True
.Replace _
What:="Ae", _
Replacement:="Ä", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=True
End With
End Sub