Given you're using XL2007 you can / should really use SUMIFS function in preference to SUMPRODUCT given it is more efficient (significantly so in truth), eg:
In regard to the SUMPRODUCT... the #VALUE! error will as teylyn points out be generated wherever either date ranges or summation ranges contain non numerics - this is because of the explicit coercion being undertaken via the * of the arrays and the use of the MONTH function.
On that basis it's better (IMO) to use double unary (to remove issues re: summation range - no explicit coercion - think SUM(A1:B1) rather than A1+B1) but also to use a TEXT check on the date range rather than a coercion technique - though this is slower (according to Bob - author of the link referenced), eg:
The advantage of SUMPRODUCT over SUMIFS is that it is backwards compatible with earlier versions ... if not needed use SUMIFS.
If using SUMPRODUCT I would recommend you look into setting up Dynamic Named Ranges to restrict the size of the ranges being referenced, in the above you are processing nearly 30000 cells - repeated multiple times - will lead to slowdown in performance.
Bookmarks