title: Excel IF AND statement returning false when true
body: <p>I have a formula that is supposed to check if two statements are true: that the name shows up corresponding with a certain date. If true return the word YES, and if false return the word NO. </p>
  
  <p>For some reason the formula provides the correct answer in some cases and the wrong answer in others and I can't figure out where I am going wrong.</p>
  
  <p>The statement is as follows:</p>
  
  <pre><code>=IF(AND(Transfers!$A$2:$A$500=$B$2,Transfers!$B$2:$B$500=A3),"Yes","No")
  </code></pre>
  
  <p><code>Transfers</code> is just the name of the tab where it's searching for the criteria.</p>
  
  <p>For some reason some provide <strong>YES</strong> as it should and other provide <strong>NO</strong> when it should be <strong>YES</strong>. Anybody have any idea what I'm doing wrong?</p>