Hi,
I have fixed the problems you found. The following code should now work much better for you:
Sub splitVersion2()
Dim lastOrder, inkooporder As String
Dim rowCount As Integer
lastrow = [b65536].End(xlUp).Row
rowCount = 2
Columns("A:S").Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("C2:C34") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A1:S34")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
ActiveSheet.Cells(1, 1).Select
End With
lastOrder = 0
For i = 2 To lastrow
inkooporder = Sheets("Sheet1").Cells(i, 3)
If Not inkooporder = lastOrder Then
Worksheets.Add(After:=Worksheets(1)).Name = inkooporder
Sheets("Sheet1").Select
Cells.Select
Selection.Copy
Sheets(inkooporder).Select
Cells.Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("A1").Select
For x = 1 To 19
Sheets(inkooporder).Cells(1, x) = Sheets("Sheet1").Cells(1, x)
Next x
rowCount = 2
End If
For x = 1 To 19
Sheets(inkooporder).Cells(rowCount, x) = Sheets("Sheet1").Cells(i, x)
Next x
rowCount = rowCount + 1
lastOrder = inkooporder
Next i
Sheets("Sheet1").Select
Range("A1").Select
End Sub