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
 
Thanks Bob but its still not working. Now it says my formula has an
error
 
Hi
can you post your new formula so that we can have a look at it
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top