title: SUMIF variable number of columns with varying rows in Excel
body: <p>I'm wanting to SUM a number of rows in Excel, based on a value. In the picture below, you can see the table.</p>
  
  <p>I want to put a value in F1, containing the sum of the values for Jan -> (month # specified in C2) where the Status is the value in C1.</p>
  
  <p>If you do </p>
  
  <p>=SUMIF(B5:B11,"open",INDIRECT(CONCATENATE("C5:",ADDRESS(11,2+C2))))</p>
  
  <p>you get 25 (Cell I2) (which is the sum of C5 and C8), whereas what I actually want as a result is 50 (the sum of C5+D5 (open in Jan and Feb), and C8+D8 (open in Jan and Feb) )</p>
  
  <p>Hope that makes some sense ?</p>
  
  <p>I look forward to any comments, suggestions.</p>
  
  <p>Cheers</p>
  
  <p>Nick</p>
  
  <p><a href="http://ntdd2425.fm.netbenefit.co.uk/table.png" rel="nofollow noreferrer">alt text http://ntdd2425.fm.netbenefit.co.uk/table.png</a></p>
  
  <p>Edit - I'm hoping that I'd be able to do this without creating intermediate columns. The inconsistency in Excel is due to the fact that SUM seems to support summing across multiple columns, but SUMIF doesn't. So this does work:</p>
  
  <p>=SUM(INDIRECT(CONCATENATE(ADDRESS(5,3),":",ADDRESS(5,2+$C$2))))</p>