sir drinks alot
New Member
- Joined
- Aug 1, 2006
- Messages
- 37
I am trying to sort multiple rows of information with about 182 columns filled, using VBA Sort.
I am sorting first by a column with true, false values in it, then by a date column. for some reason it does not work correctly. here is the code:
If i use the same code on only two columns next to each other, true/fasle & dates, it works fine. Does it have something to do with having so many columns of info?
Thanks.
I am sorting first by a column with true, false values in it, then by a date column. for some reason it does not work correctly. here is the code:
Code:
Dim LastR As Range
With ActiveWorkbook.Sheets("main")
Range("4:1000").Select
Selection.SORT Key1:=Range("W4"), Order1:=xlDescending, Key2:=Range("H4") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
End With
If i use the same code on only two columns next to each other, true/fasle & dates, it works fine. Does it have something to do with having so many columns of info?
Thanks.