If you are happy to use a macro, this sub detects if your data is in 1 column or 3. Run the macro to get the data into one column, do your sort, then run the macro again to put it back into 3 columns
Public Sub ThreeColumnRearrange()
Dim ws As Worksheet
Dim lrw_1 As Long
Dim lrw_2 As Long
Dim lrw_3 As Long
Dim temp As Long
Set ws = Sheet1
ws.Activate
lrw_1 = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row
lrw_2 = ws.Cells(ws.Rows.Count, "H").End(xlUp).Row
lrw_3 = ws.Cells(ws.Rows.Count, "M").End(xlUp).Row
If lrw_2 > 4 Or lrw_3 > 4 Then 'if in 3 columns, make 1
If lrw_2 > 4 Then 'copy and past section 2
ws.Range("H5:K" & lrw_2).Cut
ws.Cells(lrw_1 + 1, "C").Select
ws.Paste
lrw_1 = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row
End If
If lrw_3 > 4 Then 'copy and past section 2
ws.Range("M5:P" & lrw_3).Cut
ws.Cells(lrw_1 + 1, "C").Select
ws.Paste
lrw_1 = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row
End If
ElseIf lrw_1 > 4 Then 'if in 1 column, divide into 3
temp = (lrw_1 - 4) \ 3
Debug.Print (lrw_1 & " " & temp)
ws.Range(Cells(lrw_1 - temp + 1, "C"), Cells(lrw_1, "F")).Cut
ws.Range("H5").Select
ws.Paste
lrw_1 = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row
ws.Range(Cells(lrw_1 - temp + 1, "C"), Cells(lrw_1, "F")).Cut
ws.Range("M5").Select
ws.Paste
End If
End Sub
NB - I don't generally like use "Select" and but as I am unsure where your level is at, this seemed best.
-Bare in mind that if you data is in slightly different locations, you'll need to edit the cell references
Bookmarks