Macro that sorts data that has headers in ascending order in Excel. This macro assumes that you data has headers on it. This means that you data has a row that labels what the data underneath it is or stands for in the worksheet. The header row will not be sorted; however everything underneath that row will be sorted. Header rows are assumed to be one single row in Excel. This means that if your header row is actually two rows, you need to account for this by moving the data table range that you will list in the macro down one.
This macro sorts one column within the data set. This is a simple sort macro for Excel and works in most versions of Excel.
To use this Excel macro, simply replace A1:C56 with the range of the entire data table that will be changed or re-arranged by the sort and then change A1 to point to the column or top cell in the column of the data from which you would like to sort the entire data set.
Sub Sort_Ascending_With_Header()
'Sorts a worksheet in ascending order and assumes there are headers on the data
Range("A1:C56").Sort Key1:=Range("A1"), Header:=xlYes
End Sub