title: Find which range a cell belongs to
body: <p>I have an excel sheet with columns A and B populated with numbers, a la:</p>
  
  <pre><code>1   12
  13  20
  21  30
  31  35
  </code></pre>
  
  <p>This is just as an example, in reality A and B are columns of length 50ish.</p>
  
  <p>In this example, I have another column with values in it between 1 and 30.  I want to write a function that returns which range it is between.  Perhaps a 1 if it is between the first range (1-12) 2 between the second (13-20) etc.</p>
  
  <p>This is the way the data was presented to me, if it needs to be re-arranged so be it.</p>
  
  <p>Does anyone know any functions that would be useful to solve this problem?  I have read that nested if statements are limited to 7 "if's" so I would need to write out a bunch of them.</p>
  
  <p>Thanks folks.</p>