I would suggest using SUM() with an arrays:
=SUM(C5:G11*(IF(COLUMN(C5:G11)<=($C$2+1),1,0)*IF($c$1=b5:b11,1,0)))
Enter that with Ctrl-Shift-Enter so it goes in as an array formula.
YMMV, but it worked with a quick test over here.
Basically, you're multiplying three arrays together: one with your data, one with a 1 or 0 based on the month match by column, the last with a 1 or 0 based on the status filter. The arrays don't match in size, so they are repeated.
richardtallent
2009-09-03 16:17:12