title: How to perform ranking based on several conditions?
body: <pre><code>Student Total   Result  GPC
  A   398 PASS    1.2
  B   341 PASS    1.6
  C   396 PASS    1.8
  D   402 FAIL    1.6
  </code></pre>
  
  <p>Let's say I have a table as above and I would like to perform sorting/ranking based on the following conditions:</p>
  
  <ol>
  <li>Sort by "Result" descending</li>
  <li>Then sort by "GPC" ascending</li>
  <li>Finally sort by "Total" descending</li>
  </ol>
  
  <p>Hence the end result would be like this:</p>
  
  <pre><code>Student Ranking
  A   1
  B   2
  C   3
  D   4
  </code></pre>
  
  <p>How can I do the sorting above in excel? I had tried to use RANK in the formula but it can only cater to one condition.</p>