Why not try something more simple like:
=SUMPRODUCT(('the data'!A2:A4000=A1)*('the data'!B1:HJ1=A3)*('the
data'!B1:HJ1<=A4),B2:HJ4000)
where A3 is the start date and A4 the end date.
HTH
Jean-Guy
--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile:
http://www.excelforum.com/member.php...fo&userid=6261
View this thread:
http://www.excelforum.com/showthread...hreadid=514001