title: Excel Vlookup Function
body: <p>I have a spreadsheet that contains two worksheets. Each Worksheet contains the C column which I need to only extract the last numbers after the dash. So in Cell D it does this by using the formula: </p>
  
  <pre><code>=TRIM(RIGHT(SUBSTITUTE(C2,"-",REPT(" ",100)),100))  
  </code></pre>
  
  <p>and the correct number is shown in Cell D as you can see.</p>
  
  <pre><code>A   B   C                        D  E
  250 stevem  GP CONSTRUCCION-9-50399 50399   4/12/2013 0:00
  223 stevem  ANIMATIC MEDIA-9-50400  50400   4/12/2013 0:00
  224 stevem  DIGITAL ENGINEE-9-50401 50401   4/12/2013 0:00
  </code></pre>
  
  <p>I then need to do a vlookup on cell D in sheet 1 and match it with Cell D in sheet two which contains the same formula for extracting only the last digits after the -</p>
  
  <p>My Vlookup is:</p>
  
  <pre><code>=VLOOKUP(D:D,Sheet2!A:F,2)
  </code></pre>
  
  <p>but I think because the lookup cell does not contain Just values, but rather a formula that returns a value, I get an error #N/A</p>
  
  <p>Will Vlookup work for what I am trying to do?</p>