PDA

View Full Version : Solved: Sorting a Range, Header info?



YellowLabPro
09-12-2007, 09:48 AM
I am sorting a range, used the macro recorder.
All makes sense except what might be the Header parameter.
I get Header:= xlguess, xlyes, xlno. What are my options here for additional input requirements if I choose xlyes?
Should I enter the Headers into the code?

range("A2:K" & lrwSource).Sort key1:=range("A2"),order1:=ascending, key2:=("D2"),order2:=xlAscending _
key3:=range("B2"),order3:=xlAscending, Header:=xlYes

Bob Phillips
09-12-2007, 09:58 AM
Enter the headers into the code?

xlYes just means that the first row in the data is a header row, so it will not be sorted, but will stay statically where it is during and after the sort.

YellowLabPro
09-12-2007, 10:07 AM
Thanks.