Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

excel sumif multiple columns data

My data is:

enter image description here

I need to calculate a sum of the "col1" and "col2" where "name" is "a": 1+2+5+6 = 14.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Now I am using:

=SUMIF(A:A,"a",B:B)+SUMIF(A:A,"a",C:C)

Is there any better way (eg with arrays)?

>Solution :

Try this, for the sum of values where name is a,

Formula in cell B6 –> Applicable To All Excel Users

=SUMPRODUCT(($A$2:$A$4=$A6)*($B$2:$C$4))

Formula in cell C6 –> Applicable To Only O365 & Excel 2021 Users

=SUM(FILTER($B$2:$C$4,A6=$A$2:$A$4))

SUMPRODUCT

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading