title: I want to index specific values in a specific range
body: <p>I have a list of students that I have the following mark criteria,</p>
  
  <ol>
  <li>from <code>0</code> to <code>-500</code></li>
  <li>from <code>-501</code> to <code>-1000</code> </li>
  <li>from <code>-1001</code> to <code>-5000</code>    </li>
  <li>from <code>-5001</code> to <code>-10000000000</code></li>
  </ol>
  
  <p>The list of students and the categorization were on sheet 1. On sheet 2 I have the criteria as headers.</p>
  
  <p>I want a formula that I can use under lets say criteria 1 
  and it automatically fills all the account numbers that met the criteria under the column that has that criteria as a header.</p>
  
  <p>Sheet 2:<br>
  <a href="https://i.stack.imgur.com/Zckeu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zckeu.png" alt="enter image description here"></a></p>