Hi (it's been a while)
If I understand you correctly, you want some way to extract the categories, and then to apply the sumif() to that?
I put this in F22 of your sample WB, and copied down...
=IFERROR(INDEX($E$3:$E$19,MATCH(0,INDEX(COUNTIF($E$21:E21,$E$3:$E$19),),0)),"")
Bookmarks