title: multiple excel if statements to produce value 1,2 or 3
body: <p>I am trying to find out the right if statement to use for this task:</p>
  
  <pre><code>if B5 is higher than C5 = 1
  if B5 is within 2% higher than C5 = 2
  if B5 is lower than C5 = 3
  </code></pre>
  
  <p>I have the formula for the second statement</p>
  
  <pre><code>=IF(AND(B5&gt;(C5-(C5*2/100)),B5&lt;(C5+(C5*2/100))),"yes","no")
  </code></pre>
  
  <p>Im just not sure how to put it into one statement to get one of the 3 numbers to come out at the end. main thing im struggling with is that there are only two answers in an excel if statement it can return</p>