Hi, is there a way to force a Header row on a sort in VBA
xlGuess is the default, are there any other options?
I can't seem to get the header row to stay no matter how i select the cells before sorting.
Thanks
xlGuess is the default, are there any other options?
I can't seem to get the header row to stay no matter how i select the cells before sorting.
Thanks
Rich (BB code):
Intersect(Range("A:H"), ActiveSheet.UsedRange).Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Key2:=Range("E2") _
, Order2:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal