title: "Method 'Range' of object '_Worksheet' failed" error message
body: <p>I have tried the code suggested in the question linked at the bottom but get an error on the line:</p>
  
  <pre><code>Set getNthColumn = Range(startCell, endCell)
  </code></pre>
  
  <p>The error is </p>
  
  <blockquote>
    <p>Method 'Range' of object '_Worksheet' failed</p>
  </blockquote>
  
  <p>This code is supposed to set the colour formatting of a range cells whose formula is a VLOOKUP.</p>
  
  <p>All help appreciated.</p>
  
  <p><a href="https://stackoverflow.com/questions/22151426/vlookup-to-copy-color-of-a-cell-excel-vba">Vlookup to copy color of a cell - Excel VBA</a></p>