Google-sheets – How to SUM on all column based on their own key

formulasgoogle sheets

As the title, I am stuck with getting the SUM of category A and B ( as shown in the pic below )

enter image description here

The left side is the Total and the right side is Individual.
All I want is to get the total value of 120 for category A and 150 for category B.

Thank you in advance

Best Answer

A3:

=SUMIF(D3:J4,"A",E3:K4)

B3:

=SUMIF(D3:J4,B2,E3:K4)