title: Excel average based on row and column values
body: <p>I would like to calculate the average (and other summary statistics) of algae counts based on the algal group (Column B) and the month (collection dates are in row 1). The first few columns and rows look like this:</p>
  
  <pre><code>row B---------------------C-------------------D
  
  Algal Group -------6/5/2000 ----------7/5/2000-----etc.
  
  Cyanobacteria-------5---------------------60        
  Bacillariophyta-------2---------------------40      
  Xanthophyta-------[blank]---------------30      
  </code></pre>
  
  <p>I've tried using the standard AVERAGEIFS combined with the MONTH forumla, but I think the row of dates is throwing it off. I've also tried inserting a new row below the dates (i.e., row 2) with the Month of the collection date in row 1, and referring to that column in an AVERAGEIFS. That didn't work either. I've also tried entering it as an array formula. The dates are C1:DW1, Algae Groups are B2:B246. Any thoughts are much appreciated! </p>