Take out the N/A in columns D and E and you can use:
Formula:
=SUMPRODUCT(--($B$2:$B$13<>""),--($C$2:$C$13-$B$2:$B$13<=21),--($D$2:$D$13<>""),--($D$2:$D$13-$B$2:$B$13<=42))
to get the first value.
If you add a "Follow up" helper column in column G with the formula: G2 and copy down:
Formula:
=COUNTIF($A$2:$A$13,$A2)-1
... you can then use:
Formula:
=SUMPRODUCT(--($B$2:$B$13<>""),--($C$2:$C$13-$B$2:$B$13<=21),--($E$2:$E$13<>""),--($E$2:$E$13-$B$2:$B$13<=42),--($G$2:$G$13>=4))
to get the second value.
You haven't got a lot of data so you'll need to check it out but it looks as though it will work.
Regards, TMS
Bookmarks