Hi, I'm looking to sort data in excel vba, I have a method that work (see below), but I noticed that it doesn't move the cell names, because I rely heavily on cell names, I need to be able to move them with the sort. Is there a way to do this?
Thanks

If Range("SRTCHK").Value <> Range("SORT_BY").Value Then
        Range("SRTCHK").Value = Range("SORT_BY").Value
        srt = Range("SORT_BY").Value
        Range("F1:J500").Sort _
            Key1:=Cells(1, srt), _
            Order1:=xlAscending, _
            Header:=xyes, _
            OrderCustom:=1, _
            MatchCase:=False, _
            Orientation:=xlTopToBottom
     End If