If you want to sort data on multiple levels in a range .Snapshot below-
Here is the code-
'1ST level SORT ON NAME COL A
'2ND level SORT ON START DATE COL B
'3RD levle SORT ON END DATE COL C
Sheets("Sample").Range("a1:d" & Sheets("Sample").Range("a1").End(xlDown).Row).Sort _
key1:=Sheets("Sample").Range("A:A"), order1:=xlAscending, _
key2:=Sheets("Sample").Range("B:B"), order2:=xlAscending, _
key3:=Sheets("Sample").Range("C:C"), order3:=xlAscending, _
Friday, December 23, 2011
Multiple level sort using VBA
Subscribe to: Post Comments (Atom)
Import data from SQL
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
If you want to add a new menu on mouse right click "Workbook Navigation showing you the list of all open workbooks and worksheets in ea...
Macro to Export Range in Json Format Option Explicit Sub export_in_json_format() Dim fs As Object Dim jsonfile Dim rangetoex...
If you are interested in learning Multiple Level Sorting Using VBAReplyDelete
This macro is perfect. Thank you very much. I used it in a macro from Cols A to W and for a sheet called "Misc". It works perfectly.ReplyDelete
Would you please share your code of multi-level sorting as for me till 3rd level it is working fine but from 4th its started failing.
Thanks in advance.
excel version you are using ?Delete
Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.ReplyDelete
excel vba courses london