ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SUMIF based on 2 conditions (https://www.excelbanter.com/excel-worksheet-functions/5246-sumif-based-2-conditions.html)

TimH

SUMIF based on 2 conditions
 
Is there a way to do SUMIF to sum a column of number based on meeting 2
independent conditions rather than 1. (i.e. checking independent values or
conditrions in 2 different cells.)

Paul Corrado

=SUMPRODUCT(("rangea"="condition1)*("rangeb"="cond ition2")*("range to sum"))

Note all ranges must contain the same number of rows or columns.

With two columns of criteria and one column of data

=SUMPRODUCT(A1:A10="One")*(B1:B10=5)*(C1:C10))





"TimH" wrote in message
...
Is there a way to do SUMIF to sum a column of number based on meeting 2
independent conditions rather than 1. (i.e. checking independent values or
conditrions in 2 different cells.)




mzehr

Hi Tim,
Yes

Sumproduct() Introduction For - Great explanations!!
see http://www.xldynamic.com/source/xld.SUMPRODUCT.html


"TimH" wrote:

Is there a way to do SUMIF to sum a column of number based on meeting 2
independent conditions rather than 1. (i.e. checking independent values or
conditrions in 2 different cells.)


RagDyer

To answer your original question, yes, there is a *way*.
And that "way" is to *add* the SUMIF()'s.

=SUMIF(A1:A100,D1)+SUMIF(A1:A100,D2)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"TimH" wrote in message
...
Is there a way to do SUMIF to sum a column of number based on meeting 2
independent conditions rather than 1. (i.e. checking independent values or
conditrions in 2 different cells.)



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

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