kann mir jemand verraten, wie ich bei der Sortierung einstellen kann, das beispielsweise bei Einträgen 60, 70, und 60/62 der Wert 60/62 in der Sortierreihenfolge vor der 70 steht und nicht dahinter?
Gruß Manfred
Private Sub OptionButton11_Click()
Cells.Select
Selection.Sort Key1:=Range("K2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Cells(2, 1).Select
End Sub
Bitte nur antworten, wenn das wirklich möglich ist. Ansonsten nehme ich die Quick&Dirty Lösung von DieterSub Sort_Hilfsspalte()
Dim oSh As Worksheet, iCalc%
Dim SortColum$
SortColum = "K" 'Sortieren nach Spalte?
Set oSh = Sheets("Tabelle1") 'Tabelle anpassen
With Application
iCalc = .Calculation
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
With oSh.UsedRange
SortColum = oSh.Range(SortColum & "1").Column
With .Columns(.Columns.Count).Offset(0, 1)
'Hilfsformel
.FormulaR1C1 = _
"=IF(ISERR(--LEFT(RC" & SortColum & _
",FIND(""/"",RC" & SortColum & ")-1)),RC" & _
SortColum & ",--LEFT(RC" & SortColum & _
",FIND(""/"",RC" & SortColum & ")-1))"
oSh.UsedRange.Sort .Cells(1, 1), Order1:=xlAscending, Header:=xlYes
.Cells(1, 1).EntireColumn.Delete
End With
End With
.ScreenUpdating = True
.EnableEvents = True
.Calculation = iCalc
End With
End Sub
Gruß Tino