![]() |
|
#9
|
||||
|
||||
|
For example:
Code:
Dim ws As Worksheet
Set ws = ActiveWorkbook.Worksheets("Sheet1")
With ws.Sort
With .SortFields
.Clear
.Add Key:=ws.Range("A2:A19"), SortOn:=xlSortOnValues, _
Order:=xlAscending, CustomOrder:="h,k,a,d,e", _
DataOption:=xlSortNormal
End With
.SetRange ws.Range("A1:A19")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie - Need help with a macro and drop down lists | vipvanilla | Word VBA | 4 | 02-13-2014 01:30 PM |
| Macro to add periods into MAC address lists | auriuman78 | Word VBA | 1 | 01-29-2014 10:30 AM |
Cannot delete old 2003 custom menu from 2010 template
|
Smallweed | Word | 1 | 10-02-2013 03:53 PM |
| custom icon, undo/redo for macro, permanent macro | Rapier | Excel | 0 | 08-05-2013 06:30 AM |
Delete custom heading styles
|
ubns | Word | 1 | 07-31-2012 08:35 PM |