title: Excel VBA Multi line sort by multiple criteria in Excel 2016
body: <p>Continued from this thread: <a href="https://stackoverflow.com/questions/51198558/dynamic-data-valdiation-drop-downs-with-multiple-critera-ranking/51200469?noredirect=1#comment89411736_51200469">Dynamic data valdiation drop downs with multiple critera ranking</a></p>
  
  <p>I want to sort a list based on multiple criteria and then rank it and finally display it in a drop down data validation list (drop downs are covered in the thread referenced in the link above).</p>
  
  <p>How can I sort data on multiple critera in Excel 2016? I have tried using the advanced filter and the worksheetChange event. I want to manipulate the data before I sort it and I want to rank the data before I sort it.</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
  If Target.Address = "$D$2" Then
      Range("ÄB1[#All]").AdvancedFilter Action:=xlFilterInPlace, _
                         CriteriaRange:=Range("D1:D2"), Unique:=False
  End If
  
  End Sub
  </code></pre>