Dim x as range
Set x = Range("A1:C5")
Sub SortRow()
'
' SortRow Macro
'
Dim CurRow As Integer
'
For CurRow = 1 To 874
Range(M1, AE1).Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add2 Key:=Range( _
"MCurRow:ACCurRow"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("MCurRow:ACCurRow")
.Header = xlGuess
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With
Next CurRow
Application.Run "SpotifyCatalogSpreadsheetTemp.xlsm!SortRow"
Application.Goto Reference:="SortRow"
Application.WindowState = xlNormal
End Sub
Sub SortRow()
Dim CurRow As Integer
For CurRow = 1 To 874
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SortFields.Clear
.SortFields.Add2 Key:=Range("M" & CurRow), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Range("M" & CurRow & ":AC" & CurRow)
.Header = xlGuess 'may be better to change this to XlYes or XlNo
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With
Next CurRow
'Application.Run "SpotifyCatalogSpreadsheetTemp.xlsm!SortRow" 'this might be dodgy if it's calling this very macro.
Application.Goto Reference:="SortRow"
Application.WindowState = xlNormal
End Sub