title: Check if number in range - Google sheets
body: <p>How do I check if a number is in a range of numbers (not a range of cells). For example in many programming languages I can write a &gt;= 1 &amp;&amp; a &lt;= 7. How do I express this in Google Sheets?</p>
  <p>I tried to apply <a href="https://stackoverflow.com/questions/38100298/check-if-number-in-range/38100523#38100523?newreg=40bd5613d28b45608a19793acce14f64">this solution</a>, but how would that formula work in order to handle multiple ranges?
  For example:</p>
  <p>C12 = 5</p>
  <p>I want to check if C12 is either in ranges:</p>
  <ul>
  <li>1-10</li>
  <li>11-25</li>
  <li>26-50</li>
  </ul>
  <p>I'm trying the following but it's not working:</p>
  <p>=IFS(AND(C12&gt;=1,C12&lt;=10),&quot;1-10&quot;,(AND(C12&gt;=11,C12&lt;=25),&quot;11-25&quot;,&quot;26-50&quot;))</p>