Whats wrong with my formula?

  • Thread starter Thread starter Mycotopian
  • Start date Start date
M

Mycotopian

I am getting an error that says I am missing a parenthesis on th
following formula

=SUMIF((AND('Prime Sales'!A:A>=01/01/01,'Prim
Sales'!A:A<=01/31/03,'Prime Sales'!C:C)
 
=SUMIF(AND('Prime Sales'!A:A>=01/01/01,'Prime Sales'!A:A<=01/31/03),'Prime
Sales'!C:C)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi

I don't think this will work as SUMIF only accepts one condition (as
second parameter and not as first parameter). Have a look at the syntax
description of SUMIF in the Excel helpfile.

Maybe for your problem you can use SUMPRODUCT instead:
=SUMPRODUCT(('Prime Sales'!A1:A999>=01/01/01)*('Prime
Sales'!A1:A999<=01/31/03),'Prime Sales'!C1:C999)

HTH
Frank
 
Hi Bob

are you sure this will work? Though the AND function is now correct I
don't think SUMIF will accept these parameters.

Regards
Frank
 
I tried

=SUMIF(AND('Prime Sales'!A:A>=01/01/01,'Prim
Sales'!A:A<=01/31/03),'Prime
Sales'!C:C)

and it gave me an error. Then I tried

=SUMPRODUCT(('Prime Sales'!A1:A999>=01/01/01)*('Prime
Sales'!A1:A999<=01/31/03),'Prime Sales'!C1:C999)

and it accepted the formula and gave me a REF#! erro
 
Try

=SUMPRODUCT(--('Prime Sales'!A1:A999>=--"1/1/1"),--('Prime
Sales'!A1:A999<=--"1/31/3"),'Prime Sales'!C1:C999)

or better

=SUMPRODUCT(--('Prime Sales'!A1:A999>=DATE(2001,1,1)),--('Prime
Sales'!A1:A999<=DATE(2003,1,31)),'Prime Sales'!C1:C999)
 
Hi

currently Excel interprets your dates as cell references. So change the
formula to
=SUMPRODUCT(('Prime Sales'!A1:A999>=DATE(2001,01,01))*('Prime
Sales'!A1:A999<=DATE(2003,01,31)),'Prime Sales'!C1:C999)

Frank
 
Frank,

No, I goofed. I just corrected the errors without thinking. As you stated,
SUMIF only works on one condition.

Bob
 
Back
Top