title: IF statement, number less than X but greater than Y
body: <p>Within my program I have a column(H) specifying hours:  </p>
  
  <pre><code>(24.2, 23.5, 21.5, 25.0, 28.3, 23.1, 22.5, 17.9, 22.1, 16.2, 24.3, 23.8)  
  </code></pre>
  
  <p>this continues for 600 or so more rows.  </p>
  
  <pre><code>Max hours = 36.88348
  Min hours = 16.15569
  </code></pre>
  
  <p>I'm trying to categorise the hours into four different numbers to later use for more accurate data than averages:   </p>
  
  <pre><code>0 = 16-20,  
  1 = 21-25,  
  2 = 26-30,  
  3 = 31&gt;.  
  </code></pre>
  
  <p>So far I have came to this solution:   </p>
  
  <pre><code>=IF($H4&gt;=31,3,IF($H4&lt;=20,0,IF($H4&gt;=21&lt;=25,1,IF($H4&gt;=26,2)))) 
  </code></pre>
  
  <p>This works apart from the <code>21-25($H4&gt;=21&lt;=25,1)</code>.  </p>
  
  <p>If anybody could assist me, I believe it's something basic as my syntax.</p>