title: Excel evaluates "FALSE" and blank cell as equal
body: <p>I have a spreadsheet that uses VBA to retrieve data from a database and copy it into a worksheet. I need to compare two columns to see if they match. The possible values are "TRUE", "FALSE", or a blank cell.</p>
  
  <p>I have a simple formula to flag the row if the values are different: <code>=IF(I2=J2,"Same","Difference")</code></p>
  
  <p>This formula works fine if the values match, or if they are TRUE/Blank or TRUE/FALSE, but it does not evaluate as expected when there's a FALSE and a blank cell!
  <a href="https://i.stack.imgur.com/cFjbY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cFjbY.png" alt="Screenshot of formula not evaluating as expected"></a></p>
  
  <p>If I type in the word "FALSE" the formula evaluates properly (like in the image below). The formula only seems to be tripped up when the data is pasted from the database by VBA.</p>
  
  <p><a href="https://i.stack.imgur.com/fwzCl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fwzCl.png" alt="screenshot of formula evaluating correctly when I type in the word &quot;False&quot;"></a></p>
  
  <p>I suspect this has something to do with Excel treating FALSE and blank cells as both equivalent to "0", but I cannot figure out how to easily workaround this "feature." A couple things I tried:</p>
  
  <ul>
  <li>I confirmed the cell types are set to "Text" for all cells and I tried using VBA to force the format to be text by using <code>Range("I:J").NumberFormat = "@"</code>. Still evaluates to "Same."</li>
  <li>I tried manually recalculating the formula by using the "Calculate Now" option in the Formulas ribbon. Still evaluates to "Same."</li>
  <li>I can write an ugly formula in the IF statement to check if the cells match: <code>=IF(OR(AND(I2="FALSE",J2="FALSE"), AND(I2="TRUE",J2="TRUE"), AND(I2="",J2="")),"Same","Difference")</code> Is there a way to simplify this formula  or force the I2=J2 formula to calculate correctly in case we ever have to handle data other than true/false/blank?</li>
  </ul>