title: If two cells contains certain text put the text value of the adjacent cell into a new cell
body: <p>I wanted to ask how in Excel can I match a text value in two columns and if there is a match, then copy/paste the value of an adjacent cell into a new cell.</p>
  
  <p>For example:</p>
  
  <pre><code>   A         B       C                  L         M
  gene_id     gene    value     ...    gene_id     gene
  XLOC001     top     20               XLOC003      ?
  XLOC002     high    5                XLOC001      ?
  XLOC003     left    45               XLOC002      ?
  XLOC004     right   10               XLOC004      ?
  </code></pre>
  
  <p>The formula in column M will look in the first row in column L and find a match in column A. If there is a match then return the value in column B. I can then copy/paste this formula for the other rows in column M.</p>
  
  <p>The output will be:</p>
  
  <pre><code>   A         B       C                  L         M
  gene_id     gene    value     ...    gene_id     gene
  XLOC001     top     20               XLOC003     left
  XLOC002     high    5                XLOC001     top 
  XLOC003     left    45               XLOC002     high
  XLOC004     right   10               XLOC004     right
  </code></pre>