ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sumif question (https://www.excelbanter.com/excel-discussion-misc-queries/195988-sumif-question.html)

lightbulb

Sumif question
 
Is it possible to use a sumif function with two conditions? For Example,
SUMIF Column A = Past Due, AND Column B = Sum of Qty

Thanks!

John C[_2_]

Sumif question
 
An easier way might be to use SUMPRODUCT.

=SUMPRODUCT(--(A1:A100="Past Due"),--(B1:B100="Sum of Qty"),(C1:C100))

Anchor / expand the ranges as needed.
--
John C


"lightbulb" wrote:

Is it possible to use a sumif function with two conditions? For Example,
SUMIF Column A = Past Due, AND Column B = Sum of Qty

Thanks!


Dave Peterson

Sumif question
 
=sumproduct(--(a1:a10="past due"),--(b1:b10="sum of qty"),c1:c10)

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

============
This sounds like you're working with data that is (or used to be) in a
pivottable.

Maybe you can just change the layout to get what you want.

Take a look at Debra Dalgleish's site:
http://contextures.com/xlVideo001.html
and
http://contextures.com/xlPivot02.html

lightbulb wrote:

Is it possible to use a sumif function with two conditions? For Example,
SUMIF Column A = Past Due, AND Column B = Sum of Qty

Thanks!


--

Dave Peterson


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

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