ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I sum a range after 2 different conditions are met (2 colu. (https://www.excelbanter.com/excel-discussion-misc-queries/2318-how-do-i-sum-range-after-2-different-conditions-met-2-colu.html)

Holly B.

How do I sum a range after 2 different conditions are met (2 colu.
 
I would like to sum a range if column A = x and column B = y then sum those
numbers in range C that meet the criteria. Is this possible? SumIf only
allows for one range and criteria, how can I get around this?

Peo Sjoblom


Try

=SUMPRODUCT(--(A2:A500="x"),--(B2:B500="y"),C2:C500)


Regards,

Peo Sjoblom


"Holly B." wrote:

I would like to sum a range if column A = x and column B = y then sum those
numbers in range C that meet the criteria. Is this possible? SumIf only
allows for one range and criteria, how can I get around this?


Don Guillett

try
=sumproduct((rnga="x")*(rngb=1)*rngc)

--
Don Guillett
SalesAid Software

"Holly B." <Holly wrote in message
...
I would like to sum a range if column A = x and column B = y then sum

those
numbers in range C that meet the criteria. Is this possible? SumIf only
allows for one range and criteria, how can I get around this?




tjtjjtjt

=SUMPRODUCT(--(A1:A10="x"),--(B1:B10="y"),C1:C10)

SUMPRODUCT can't do whole columns, so you'll need to identify ranges.

For a discussion on what this formula is doing:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html


"Holly B." wrote:

I would like to sum a range if column A = x and column B = y then sum those
numbers in range C that meet the criteria. Is this possible? SumIf only
allows for one range and criteria, how can I get around this?



All times are GMT +1. The time now is 04:23 AM.

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