title: Excel index match multiple row results
body: <p>I'm stuck on an Excel problem and am hoping someone can assist. I read through 10-15 topics that are similar, but I wasn't able to get anything to work. Here is where I'm at...</p>
  
  <p>I have a large data set containing columns for <code>Year</code>, <code>Name</code>, <code>Total 1</code>, <code>Total 2</code> (and 20+ other columns). The same names appear in multiple rows based on the yearly totals. On a separate sheet, I have another data set containing Name and would like to pull the data from sheet one into columns as shown below. </p>
  
  <p><a href="https://i.stack.imgur.com/CJxX9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CJxX9.jpg" alt="enter image description here"></a>         </p>
  
  <p>I have done this in the past using only one year as the initial data set with the following formula: </p>
  
  <pre><code>=INDEX(DATARANGE,MATCH([@Name],DATARANGE[Name],0),MATCH("Total 1",DATARANGE[#Headers],0))
  </code></pre>
  
  <p>The problem I am having is the result of adding multiple years of data to my 1st data set. Is there a way to match the row based on <code>name</code> and <code>year</code> and then return the results of the appropriate column?</p>