Try this formula in D1 copied down
=IF((A1=A2)*(B1=B2),"",SUM(INDEX(C$1:C1,MATCH(1,IN DEX((A$1:A1=A1)*(B$1:B1=B1),0),0)):C1))
--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:
http://www.excelforum.com/member.php...o&userid=30486
View this thread:
http://www.excelforum.com/showthread...hreadid=567246