@ Alf

FDibbins, was correct using the SUMIFS. The OP uploaded a xlsx file! So why not use the SUMIFS. There are to many people on here suggesting that they use the SUMPRODUCT when the OP's have Excel 2007> and probably confusing the matter.