title: Why vlookup function code does not work, why?
body: <p>My code is not working it gives N/A</p>
  
  <p>Vlookup on vba</p>
  
  <pre><code>    Dim ws As Worksheet
  
       Set ws = ThisWorkbook.Sheets("Loaded_Plan")
  
       With ws
           .Range("K4:K523").Formula = "=VLOOKUP(C4:C523,Volumes!$C6:$M118,5,0)"
  
  
      End With
  
  End Sub
  </code></pre>
  
  <p>expected result is that it gives the volumes</p>
  
  <p><strong>EDIT</strong>: Here is the worksheet with the VLOOKUP in column K.</p>
  
  <p><a href="https://i.stack.imgur.com/UBiEJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UBiEJ.png" alt="enter image description here"></a></p>