title: How to check that multiple values are not equal in VBA?
body: <p>I want to print a list of eight numbers to the worksheet, but only if they are all unique.</p>
  
  <p>An ideal code would be something along the lines of</p>
  
  <pre><code>If a &lt;&gt; b &lt;&gt; c Then
  </code></pre>
  
  <p>Rather than</p>
  
  <pre><code>If a &lt;&gt; b And a &lt;&gt; c And b &lt;&gt; c Then
  </code></pre>
  
  <p>Is this possible, given that the values are called from an array using the code following:</p>
  
  <pre><code>Cells(2, 8) = numarr(i)
  Cells(2, 9) = numarr(j)
  Cells(2, 10) = numarr(k)
  Cells(2, 11) = numarr(l)
  Cells(3, 8) = numarr(m)
  Cells(3, 9) = numarr(n)
  Cells(3, 10) = numarr(o)
  Cells(3, 11) = numarr(p)
  </code></pre>
  
  <p>Thanks!</p>