title: Vlookup in VBA within a for loop
body: <p>I've been having trouble getting this macro to work. I want it to loop through a range and highlight a cell if it does not equal the corresponding value on another sheet through the <code>vlookup</code> function. But I keep getting an error with this code:</p>
  
  <pre><code>For Each cell In Worksheets("Sheet1").Range("A2:A1000")
      If cell &lt;&gt; Application.WorksheetFunction.VLookup(cell, Worksheets("Sheet2").Range("C3:E128"), 3, 0) Then
          cell.Interior.Color = 65535
      Else
      End If
  Next cell
  </code></pre>
  
  <p>it keeps returning</p>
  
  <blockquote>
    <p>Run-time error '1004': Unable to get the VLookup property of the WorksheetFunction class</p>
  </blockquote>
  
  <p>any insight is much appreciated!!</p>