Gruppe
Allgemein
Problem
Wie kann ich eine Spalte mit alphanumerischen Daten sortieren?
StandardModule: Modul1
Sub NumerischSortieren()
Dim rng As Range
Application.ScreenUpdating = False
For Each rng In Range("A1").CurrentRegion.Cells
With rng
.Offset(0, 1) = Val(.Value)
.Offset(0, 2) = Right(.Value, Len(.Value) - _
Len(.Offset(0, 1).Value))
End With
Next rng
Range("A1").CurrentRegion.Sort _
Key1:=Range(Cells(1, 2), Cells(1, 2)), _
Order1:=xlAscending, _
Key2:=Range(Cells(1, 3), Cells(1, 3)), _
Order2:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
Columns("B:C").Delete
Application.ScreenUpdating = True
End Sub