Use this array formula
=SUMPRODUCT(--($A$2:$A$9="a"),IFERROR($B$2:$B$9/$C$2:$C$9,0))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
Bookmarks