title: Nested IF/AND Statements in Google Sheets
body: <p>I'm trying to use nested IF/AND statements in google sheets in order to assign a value to cells for an email trigger. Individuals go through a form and based on the results (if the training they're registering for is virtual, on the ground, or occurring in our learning management system Blackboard).</p>
  
  <p>Right now the code is as follows:
  <strong>=IF($E2="","",IF($G2="INPERSON","PERSONSEND",IF($G2="VIRTUALLY","VIRTUALSEND","")))</strong></p>
  
  <p>This code essentially just says if there is something in the form submit email (E2) and the training occurs in person, assign the value "INPERSON" to the email trigger. Likewise, if the training occurs virtually. </p>
  
  <p>However what I want to do is add an AND statement that says if the attendance type is "VIRTUALLY" AND the webinar link in column H is "Hosted in Blackboard" then the output should be a new value called "BLACKBOARDSEND".</p>
  
  <p>The code I've used so far only results in the error "Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 4 arguments."</p>
  
  <p><strong>=IF($E2="","",IF($G2="IN PERSON","PERSONSEND",IF($G2="VIRTUALLY","VIRTUALSEND","",IF(AND($G2="IN PERSON", $H2="Hosted in Blackboard","BLACKBOARDSEND","")))))</strong></p>
  
  <p>Test sheet link included: <a href="https://docs.google.com/spreadsheets/d/1RK4-KDlCctg49RK05voVb-COmk_7gZYHmk7gYbK-pMo/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1RK4-KDlCctg49RK05voVb-COmk_7gZYHmk7gYbK-pMo/edit?usp=sharing</a></p>