title: How do you calculate the Quintile for every row in Excel?
body: <p>I'm trying to calculate the quintile for every row of a column in Excel.</p>
  
  <p>The resulting value for each row in Excel should be 1, 2, 3, 4, or 5.</p>
  
  <p>A value of one will be the top 20%, a value of 5 is the bottom 20%.</p>
  
  <p>This is my current formula which SEEMS to work, but I'm curious to see if anyone has a better way, a UDF, or sees an error in my formula...</p>
  
  <pre><code>=ROUNDDOWN(RANK.AVG(A1,$A$1:$A$131,0)/((COUNT(A$1:A$131)+1)/5),0)+1
  </code></pre>
  
  <p>A1 through A131 has the values I'm placing in quintiles.</p>
  
  <p>Thanks</p>