title: excel search for a string in a table and return string if true
body: <p>Column A contains a varying text - around 1000 entries but the same text will appear in different cells. </p>
  
  <p>In a second separate column (Column G) = a separate table, each cell contains one of a number of set text strings (each can be 2 to 5 characters long). Around 20 in all.</p>
  
  <p>I want to search the start of each cell in column A for each of text strings in column G and if one is present (say G3's contents) I want G3's contents to be shown in column B in the same row as the matched cell from column A. </p>
  
  <p>The matter is complicated by the text to be matched containing both ASC and SC and a further single charcater match being on * (although I can exclude * if this gives a simpler result). </p>
  
  <p>Examples</p>
  
  <p><strong>Column A</strong> contains<br>
  ASC1 HHHH.........<br>
  ASC2 IIII.......<br>
  ASC2 AAAA.........<br>
  SC2 JJJJ....<br>
  TRIAL HOLE........<br>
  TRIALHOLE......<br>
  OP1 MMMM ...<br>
  ASC1COMPLEX<br>
  KAN1<br>
  PS BAN<br>
  *TTC Jiokl jj  </p>
  
  <p><strong>Column G</strong><br>
  ASC1<br>
  ASC2<br>
  *<br>
  OP1<br>
  PS<br>
  SC2<br>
  TRIAL<br>
  VERIFY  </p>
  
  <p><strong>So column B should show</strong><br>
  ASC1<br>
  ASC2<br>
  ASC2<br>
  SC2<br>
  TRIAL<br>
  TRIAL<br>
  OP1<br>
  ASC1<br>
  0 (or some other error/omit value)<br>
  PS<br>
  *  </p>
  
  <p>(How) can this be done? I have tried to adapt various solutions from the internet and failed.  </p>
  
  <p>Many thanks
  DaveT</p>