PDA

View Full Version : Solved: Sumif



Marcster
01-17-2006, 06:09 AM
Hello people :hi:,

I want to change the following formula:
=SUMIF('Sheet1'!C:I,"DEMO",'Sheet1'!I:I)
It sums all amounts in column I for "DEMO"

I want it changing so it sums all amounts
in column I for "DEMO" and "0 - 30 Days"
and not just "DEMO".
DEMO is in column C. 0 - 30 Days is in column G

I've tried putting an AND in but doesn't work:
=SUMIF('Sheet1'!C:I,AND("DEMO","0 - 30 Days),'Sheet1'!I:I)

Or is there another formula or a UDF I can use?. :think:

Thanks,

Marcster.

Bob Phillips
01-17-2006, 06:30 AM
=SUMPRODUCT(--('Sheet1'!C1:C100="DEMO"),--('Sheet1'!G1:G100="0 - 30 Days"),'Sheet1'!I1:I100)

Marcster
01-17-2006, 07:21 AM
Thanks XLD :friends:.

I trying to get a formula to count how many items:
=COUNTIF('Sheet1'!C:G,AND("DEMO","0 - 30 Days"))
Column G has "0 - 30 Days" in.
Column C has "DEMO" in.

Another SUMPRODUCT?.

Thanks,

Marcster.

Marcster
01-17-2006, 09:36 AM
Bingo!.

I've solved it by using this:

=SUMPRODUCT(--('Sheet1'!C2:C500="DEMO"),--('Sheet1'!G2:G500="0 - 30 Days"))

:yay

Marcster.