title: Using Switch Formula on #N/A Values
body: <p>I'm trying to create a switch formula in excel where in if the value of a cell is greater than 6 it will show as &quot;less than 6 months&quot;, whereas if the value of the cell is greater than 6 months and less than 12 it will show &quot;Less than 1 year&quot;. I also need to add that if the cell's value is #N/A it should say unknown.</p>
  <pre><code>=SWITCH(TRUE,R2&lt;6,&quot;Less than 6 months&quot;, AND(R2&gt;=6,R2&lt;12),&quot;Less than 1 year&quot;,Q2=#N/A, &quot;Unknown&quot;)
  </code></pre>
  <p>However when I do this the formula goes haywire. The cell that I compare into(R2) is from another formula and it could show numbers or the #N/A value if not applicable.</p>
  <p>How do I make the formula work that when the value is #N/A it will show as Unknown on the switch case?</p>