I have inherited a macro that sorts a standing. The worksheet was from A:O and I inserted a column between H & I.
The macro sorts and puts the ranking #s in Column A starting A8, I made the obvious changes but now when I sort the ranking numbers don’t show up except for the first # in A8 only show “1”.
The sorting is correct beacuse there is a points column where I can see it is correctly sorted, but the sequence #s are not showing.
Here it is….with what changes I made shown in {}.
Sheets(“TempStd”).Select
Columns(“A:P”).Select {was A:O}
Selection.Copy
Sheets(“Standing”).Select
Columns(“A:P”).Select {was A:O}
ActiveSheet.Paste
Range(“B7:O52”).Select {was B7:N52}
Application.CutCopyMode = False
Selection.Sort Key1:=Range(“L8”), Order1:=xlDescending, Key2:=Range(“M8”) _ {L8 was K8 & M8 was L8}
, Order2:=xlAscending, Key3:=Range(“B8”), Order3:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range(“A8”).Select
ActiveCell.FormulaR1C1 = “1”
Range(“A9”).Select
ActiveCell.FormulaR1C1 = “=IF(RC[10]<R[-1]C[10],COUNTA(R7C:R[-1]C),99)"
Range("A9").Select
Selection.Copy
Range("A10:A52").Select
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A8:A52").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Selection.Replace What:="99", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Range("A1").Select
End Sub
Help is much appreciated.
Jay.