title: search range of alternating date and payment cells
body: <p>Search a huge range</p>
  
  <p>I have a huge range (O15:BJ9309) that contains alternating cells of dates and payments in each row (date, payment, date, payment, date, payment, etc.)  I need a formula that looks for dates that contain a specific year (ex. 2014) and adds up all payments to the immediate right of that date. </p>
  
  <p>For example, in the range:</p>
  
  <pre><code>Date..............Pymt.......Date..........Pymt.....Date.........Pymt  
  12/18/2013....$400.....1/2/2014....$750.....2/1/2014...$320
  </code></pre>
  
  <p>In the above example, it would add $750 + $320 because both payments were made in 2014, but ignore a $400 payment made in 2013.
  I’ll insert this formula in a hidden table, adjusting it to search for subsequent years:</p>
  
  <pre><code>Tax Year.....Gross
  2014...........$80,000
  2015...........$75,000
  2016...........$93,000
  </code></pre>
  
  <p>Once that’s in place, I want to insert two cells into my Date and Payment’s page header, one labeled “Tax Year” and the second “Gross.”   If “2015” is typed into the Tax Year cell, “$75,000 displays in the Gross cell.  So I need a formula for that, too.</p>
  
  <p>Many Thanks!</p>