I inserted the macro from post #4 and made some changes
Two lines are marked testing since I just wanted to see the sort part
JumpHere: '<<<<<<<<<<<<<<<<<<<<<<<<<< testing
Dim rData As Range, rDataHeaders As Range, rNumber As Range
Dim iX As Long
Dim sTemp As String
Application.ScreenUpdating = False
ws.Range("B3", Range("B3").End(xlDown)).Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B3").Value = "temp"
Set rDataHeaders = ActiveSheet.Cells(1, 1).CurrentRegion
With rDataHeaders
Set rDataHeaders = .Cells(3, 1).Resize(.Rows.Count - 2, .Columns.Count)
End With
With rDataHeaders
Set rData = .Cells(2, 1).Resize(.Rows.Count - 1, .Columns.Count)
End With
For Each rNumber In rData.Columns(1).Cells
With rNumber
sTemp = .Value
iX = InStr(sTemp, "X")
.Value = Right(sTemp, Len(.Value) - iX)
.Offset(0, 1).Value = Left(sTemp, iX)
End With
Next
With ws.Sort
.SortFields.Clear
.SortFields.Add Key:=rData.Columns(1), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SortFields.Add Key:=rData.Columns(3), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SortFields.Add Key:=rData.Columns(4), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange rDataHeaders
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
For Each rNumber In rData.Columns(1).Cells
With rNumber
.Value = .Offset(0, 1).Value & .Value
End With
Next
ws.Range("B3", Range("B3").End(xlDown)).Delete Shift:=xlToLeft
Application.ScreenUpdating = True
'----------------------------------------------------------------------------------------------------