title: Run through a column and if #N/A is present, replace with cell directly to right of it (Excel VBA)
body: <p>I am attempting to develop a macro in Excel that runs through a column and if the value states #N/A, it replaces it with the cell directly to the right of the respective cell. So if the column that am I searching for the #N/As is Column H, the values that I would pull from would be the next column over in Column I. Below is the code I am trying to build:</p>
  
  <pre><code>Dim NACol As Range
  Dim NARange As Range
  
  Set NARange = DEV.Sheets("Input File Creator (DND)").Range("H2:H100")
  
  Set NACol = .cells.Find(What:="#N/A", _
          after:=.Range("H2"), _
          lookat:=xlPart, _
          LookIn:=xlValues, _
          searchorder:=xlByRows, _
          searchdirection:=xlPrevious, _
          MatchCase:=False).Row
  
  For Each NACol In NARange
       'Paste the cell directly from the cell to the right
  Next
  </code></pre>
  
  <p>I am stuck on the For 
  Each if that is the correct way approach this problem. Thanks!</p>