title: Excel function for ranking duplicate values
body: <p>I have an excel sheet containing two columns of data that I'd like to rank.</p>
  
  <p>Suppose we have the following:</p>
  
  <pre><code>    A        B
      Franz    58
      Daniel   92
      Markus   37
      Jörg     58
  </code></pre>
  
  <p>I would like a formula to rank the above data based on column B, and where there are duplicate values (Franz and Jörg) to put the alphabetical name first. What I have at the moment is simply duplicating Franz twice:</p>
  
  <pre><code>     =INDEX(Name,MATCH(A2,Points,0))
  </code></pre>
  
  <p>Can someone advise me of formula / code that will rank the data and arrange duplicate values alphabetically?</p>
  
  <p>Thanks</p>