title: Nested IF statements with AND in excel
body: <p>I have a column (C) in Excel that looks like this:
  <a href="https://i.stack.imgur.com/rnGVY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rnGVY.png" alt="columns"></a></p>
  
  <p>I want the bottom cell (currently green and displaying 1) to: 
  display 2 if sum of c2:c14 = 13 and c16 = 1
  display 1 if sum of c2:c14 >= 7 and c16 = 1
  else display 0</p>
  
  <p>This is what I have and it is saying it is an invalid formula, which I am sure it is, I just can't work out where I have gone wrong...  </p>
  
  <pre><code>=IF(AND(SUM(C2:C14=13,C16=1),2)),IF(AND(SUM(C2:C14)&gt;=7,C16=1,1),0)
  </code></pre>
  
  <p>Anyone able to help?! </p>