title: Google Sheets return value based on multiple conditions
body: <p>I have a google sheet that looks like this
  <a href="https://i.stack.imgur.com/5F5Mp.png" rel="nofollow noreferrer">Empty sheet</a></p>
  <p>In the same sheet, I have this source data:
  <a href="https://i.stack.imgur.com/PDMAj.png" rel="nofollow noreferrer">Source data</a></p>
  <p>The name column is the exact same names that are arranged horizontally in the sheet
  The status column is a text</p>
  <p>My goal is to add either an &quot;X&quot; or &quot;O&quot; in the cells under each name and next to the appropriate date column based on the status of each person on a specific day.</p>
  <p>If status = &quot;On site&quot; then put &quot;X&quot;, if status is &quot;Off site&quot; then put &quot;O&quot;</p>
  <p>The output should look something like this:
  <a href="https://i.stack.imgur.com/AyaWf.png" rel="nofollow noreferrer">Goal</a></p>
  <p>So 3 things should match: name, status, and date</p>
  <p>I tried using IF() functions with AND() but it's not giving me the desired output.</p>
  <p>I tried the following:</p>
  <pre><code>=IF(AND(T15=&quot;Person 1&quot;, U15=&quot;On site&quot;, V15=A2), &quot;X&quot;, &quot;O&quot;)
  </code></pre>
  <p><code>V15</code> is the cell containing the source date and <code>A2</code> is the cell containing the destination date</p>
  <p>Why is this not working? What am I doing wrong? any help is greatly appreciated!</p>