I am facing a problem in sorting the data w.r.t to column header. I have 25 columns in which I need to sort the sata w.r.t to two of the columns. When I tried this with macros I found that the data is sorted along with column header as well and I am struck here without any clue.
You need to start from sort from row 2 and tell that there is a header
Selection.Sort _ Key1:=Range("A2"), Order1:=xlAscending, _ Header:=xlYes, OrderCustom:=1, _ MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal
Thanks to rizvisa1 for this tip on the forum.
- Macro to sort data with respect to the column
- Macros to sort data with respect to the colum ✓ - Forum - Excel
- Macro to copy data from one sheet to another based on criteria ✓ - Forum - Excel
- Macros: Copy Invoice Details From One Sheet to Another ✓ - Forum - Excel
- How to copy data from one sheet to multiple sheets using IF - Forum - Excel
- Copy data from one sheet to another based on condition using VBA - Forum - Excel