If you want to sort data on multiple levels in a range .Snapshot below-
Here is the code-
Sub MULTI_LEVEL_SORT()
'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, _
Header:=xlYes
End Sub
Download Workbook
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 create the sales funnel in Excel. Snapshot below- Download the sample workbook and go through the steps mentioned in ...
-
If you want to add a new pop up button on mouse right click menu and as soon as you click on it . It shows you multiple buttons with macro a...
If you are interested in learning Multiple Level Sorting Using VBA
ReplyDeletehttp://www.exceltip.com/tips/multiple-level-sorting-using-vbain-microsoft-excel-2010.html
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.
ReplyDeleteHi,
DeleteWould 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 ?
DeleteIts 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.
ReplyDeleteexcel vba courses london