title: How to align matching values in two columns in Excel, and bring along associated values in other columns
body: <p>I want to know how to align values in one column with matching values in another column, as shown in <a href="https://stackoverflow.com/questions/12836396/how-to-align-duplicates-on-the-same-rows-in-excel">How to align duplicates on the same rows in Excel</a>, but also carry over associated values in other columns.</p>
  
  <p>I have four columns which show inventory item numbers and their associated values.
  Column A is a list of item numbers from the first month.</p>
  
  <p>Column B is the list of values for each item number in the first month.</p>
  
  <p>Column C is a list of item numbers from the second month -- which changes in number of rows and item numbers from the first month's list.</p>
  
  <p>Column D is the list of values for each item number in the second month, which may or may not change.</p>
  
  <p>Column A and Column C can be aligned by inserting a column in C, and using <code>=IF(ISNA(MATCH(A1,D:D,0)),"",INDEX(D:D,MATCH(A1,D:D,0)))</code>.
  This will align the like item numbers onto the same row, but will not align their respective values.</p>
  
  <p>How can this function be made to also bring along the associated values from Columns B and E, so that the final display shows the first month's item number and its value on the same row as the same second month's item number and its value (in four columns) all on the same row (so the difference in value can be calculated)?</p>
  
  <p>Example:</p>
  
  <pre><code>Col A Col B  Col C  Col D
  ITEM VALUE   ITEM   VALUE
  11    $11     11     $9
  12    $15     12     $16
  13    $13     15     $21
  14    $8      17     $24
  15    $12     
  </code></pre>