title: Comparing data in two columns with "<>" returns discrepancy while values are actually equal. Formatting?
body: <p>This is <em>not a basic question</em>.</p>
  <p>There are two Excel files generated from two different systems (I can't share them here).</p>
  <p>I am comparing two columns which contain decimal values 0.001 up to 0.1.</p>
  <p>Data is being fed into arrays and compared entry-to-entry with:</p>
  <pre><code> If arrayA(row, col) &lt;&gt; arrayB(row, col) then
      ' we know it's a discrepancy
   End If
  </code></pre>
  <p>This however returns that for example 0.035 is not equal to 0.035.</p>
  <p><strong>I tested multiple things:</strong></p>
  <ol>
  <li><p>I created two NEW WORKBOOKS and copied each set of data and pasted as values into the new workbooks. This did not help, again equal values are being recognized as discrepancies.</p>
  </li>
  <li><p>I tried to select the dataset and use the &quot;Clean&gt;All formatting&quot;, however this also did not work.</p>
  </li>
  <li><p>I also tried to select both columns and change data type to the same in both columns &quot;Number, General, Text&quot; - same thing was happening.</p>
  </li>
  </ol>
  <p><strong>Now surprisingly what worked was</strong> :</p>
  <p>If I created a 'helper column' and just multiplied values by 100, then copied those, pasted as values to remove formulas. Then I divided those in another helper column back by 100, copied and pasted as values to remove formulas. Then pasted those values back to the original column which was compared --- THIS TIME THE CODE recognized that 0.035 was equal to 0.035, and that 0.3 was equal to 0.3 etc. So this worked.</p>
  <p><strong>I do realize that using</strong> just &quot;&lt;&gt;&quot; directly on two entries compares them using the binary method (the most exact), however I ran out of ideas why this is happening.</p>
  <p>One would think that if you copy and paste as values OR clear formatting from both data sets it should be working, but it does not.</p>
  <p>I would appreciate any ideas.</p>
  <p>Thanks!</p>