title: How to compare two columns in Excel (from different sheets) and copy values from a corresponding column if the first two columns match?
body: <p>I'm trying to compare column a in Sheet 1 with column a in Sheet 2, then copy corresponding values in column b from sheet 1 to column b in Sheet 2 (where the column a values match). I've been trying to read up on how to do this, but I'm not sure if I should be trying to create a macro, or if there's a simpler way to do this, maybe VLOOKUP or MATCH? I'm really not familiar with how these functions work though.</p>
  
  <p>Also, if it makes a difference, there will be repeated values in column b of Sheet 2. </p>
  
  <p>Sheet 1</p>
  
  <pre><code>12AT8001    1
  12AT8002    2
  12AT8003    3
  12AT8004    4
  12AT8005    5
  12AT8006    6
  </code></pre>
  
  <p>Sheet 2</p>
  
  <pre><code>12AT8001
  12AT8001
  12AT8001
  12AT8001
  12AT8001
  12AT8002
  12AT8002
  12AT8002
  12AT8002
  12AT8002
  12AT8003
  12AT8003
  12AT8003
  12AT8003
  12AT8003
  </code></pre>