ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel formula, 2 colons query to sum values in colon 3 (https://www.excelbanter.com/excel-programming/315994-excel-formula-2-colons-query-sum-values-colon-3-a.html)

Dirk

Excel formula, 2 colons query to sum values in colon 3
 
I need a formula like SUMIF but the query should be in TWO colons.

A B C
1 a x 2
2 a x 1
3 b x 1
4 b y 3

if A1:A4="a" AND B1:B4=x then SUM C1:C4


Bob Phillips[_6_]

Excel formula, 2 colons query to sum values in colon 3
 
=SUMPRODUCT(--(A1:A4="a"),--(B1:B4="x"),C1:C4)

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html for an explanation


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dirk" wrote in message
...
I need a formula like SUMIF but the query should be in TWO colons.

A B C
1 a x 2
2 a x 1
3 b x 1
4 b y 3

if A1:A4="a" AND B1:B4=x then SUM C1:C4





All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com