My data is:
I need to calculate a sum of the "col1" and "col2" where "name" is "a": 1+2+5+6 = 14.
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))

