title: How to remove #N/A that appears through out a worksheet? (VBA for excel Required)
body: <p>I have to clear #N/A that happens through out my worksheet when ever i run my code. I'm not sure why and have been debugging for a while but to no avail. What i could do to remedy this problem is to delete it entirely from the page, where they happens randomly. If anyone know how to, do share a VBA code with me.</p>
  
  <p>Codes of doing a simple copy and paste into another sheet</p>
  
  <pre><code>thevaluestocopy = Sheets("pivot").Cells(thefirstrow, 1) _
     .Resize(thelastrow - thefirstrow, 1)
      Worksheets("summary").Cells(3, 16) _
     .Resize(thelastrow - thefirstrow + 1, 16) = thevaluestocopy
  </code></pre>
  
  <p>I have nested that code with different Column because my pivot table changes most of the time. And when i copied for the 2nd time, #N/A appears.. Have no idea why and i believe this works work fine.</p>