Google-sheets – Google Spreadscheet COUNTIF in ARRAYFORMULA

google sheets

I'm trying to make a work/project overview, but I'm stuck. Hope you guys can help me out.

enter image description here

The countif formula checks for how much times the criteria is the same. As you can see in the image, Gregor has worked 1 time on Project A. The answer is 1. That's correct. But now I want to check the hours worked on it. So the answer should be 8.

Can someone help me out?

Best Answer

There is a similar function SUMIF(), which sums the matches instead of counting them.