title: Excel sorting and ranking from multiple sheets
body: <p>I created a spreadsheet for my uncles hockey league. It has a separate worksheet for each of five teams and an additional sheet listing the team and player rankings. Jüri Ruut was a great help in getting the data for the players sorted out, but I need to rank the teams by "points" and then by "goals for" if they have the same amount of points. </p>
  
  <p>I have column A set up with ranks 1-5. Column I has the teams "points" and column J lists the teams "goals for". So, basically:</p>
  
  <pre><code> A          B             I         J
  Rank   SortedRank   ~   Points   GoalsFor
  </code></pre>
  
  <p>In column B, I have the following formula:</p>
  
  <pre><code> =IF(I2=I1,B1,A2)
  </code></pre>
  
  <p>Is there an easy way to modify this formula to achieve what I want? My thought was that if the original IF statement was true, then I would look to see who had more goals. I was trying to modify the [value_if_true] to another IF statement, but cannot get it to work. Something like:</p>
  
  <pre><code>=IF(I5=I4,IF(J4&gt;J5,B4,A5),A5)
  </code></pre>
  
  <p>Am I even barking up the right tree here? </p>
  
  <p>As always, I hope this is coherent and understandable. Thanks!</p>