title: compare 2 cells in excel by using vba
body: <p>I would like to compare 2 cells' value and see whether they are match or not.
  I know how to do it on excel but I dont' know how to put it vba code.</p>
  
  <p><strong>Input &amp; output:</strong></p>
  
  <ol>
  <li>The value of cell A1 is already in the excel.</li>
  <li>Manually enter a value in Cell B1.</li>
  <li>click on a button_click sub to see whether the value on 2 cells are the same or not.</li>
  <li>Show "Yes" or "No" on cell C1 </li>
  </ol>
  
  <p><strong>Excel formula:</strong></p>
  
  <pre><code>=IF(A1=B1,"yes","no")
  </code></pre>