title: Handling errors using Vlookup in VBA code
body: <p>I am using a Vlookup in a VBA function as follows:</p>
  
  <pre><code>result = Application.WorksheetFunction.VLookup(target_arg, table_arg, 2, False)
  </code></pre>
  
  <p>When an entry exists in the lookup table (table_arg), then all is well.  </p>
  
  <p>If an entry does not exist in the table, then the cell has a #Value! result.  I've tried to do some error trapping, but once the Vlookup doesn't find a value, the function exits and none of my code after the above statement is executed.</p>
  
  <p>I would like to trap this case so that I can do additional processing before I exit the function.</p>