Macros to sort data with respect to the colum [Solved/Closed]

Report
-
rizvisa1
Posts
4475
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
January 6, 2016
-
Hello,

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.

Could any one of you help me out to overcome this issue.

Thanks in Advance.

1 reply

Posts
4475
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
January 6, 2016
756
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
8
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 4254 users have said thank you to us this month