![]() |
#1
|
|||
|
|||
![]()
Trying to sort ALL data automatically...sort if something is entered in Column B or C...headers in row 1...first sort based upon Column C (dates) in descending order. That all seems to be working.
What seems to not be working is the fact that I want it also to sort based upon values in Column B; after it sorts based upon Column C. The values in Column B is either 1, 2, or 3. But, I want the sort order to be "2, 1, 3". HELP! Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("B:C")) Is Nothing Then Range("C1").Sort Key1:=Range("C2"), Order1:=xlDescending, Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ Key2:=Range("B2"), Order2:=xlDescending, Header:=xlYes, OrderCustom:="2, 1, 3", MatchCase:=False, Orientation:=xlTopToBottom End If End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Officer_Bierschnitt | Excel | 1 | 11-19-2015 07:48 AM |
![]() |
FromF | Excel | 2 | 09-09-2014 02:30 AM |
How to sort word text in alphabetic order . | crossing | Word | 8 | 01-20-2012 09:51 AM |
Outlook 2007 Contacts Sort Order | bianson | Outlook | 2 | 01-27-2011 10:32 AM |
list of documents come up in random order - any ideas how to sort this? | tallscot49 | Word | 0 | 07-18-2010 12:40 AM |