title: Checking for #N/A in Excel cell from VBA code
body: <p>I'm iterating through a range of cells which hold numbers with 2 decimal places. I need to check if the cell holds '#N/A', and if it does, I need to skip it. The problem is, when a cell holds a valid number, my if condition below throws a 'Type mismatch error'. How can I avoid this?</p>
  
  <pre><code>If (ActiveWorkbook.Sheets("Publish").Range("G4").offset(offsetCount, 0).Value &lt;&gt; CVErr(xlErrNA)) Then
  'do something
  End If
  </code></pre>