If your format offsets 8 each time between questions then maybe:
Sub bardobhb()
Dim x As Long
Dim y As Long
x = Range("C1").End(xlToRight).Column
Columns("C:C").Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Worksheets("TestResults").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("TestResults").Sort.SortFields.Add Key:=Range(Cells(8, "C"), Cells(8, x)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("TestResults").Sort
.SetRange Range(Cells(1, "C"), Cells(382, x))
.Header = xlGuess
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With
y = Cells(1, x + 8).End(xlToRight).Column
Columns(x + 8).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Worksheets("TestResults").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("TestResults").Sort.SortFields.Add Key:=Range(Cells(8, x + 8), Cells(8, y)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("TestResults").Sort
.SetRange Range(Cells(1, x + 8), Cells(382, y))
.Header = xlGuess
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With
End Sub
Bookmarks