+ Reply to Thread
Results 1 to 2 of 2

Count with multiple criteria

  1. #1
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Count with multiple criteria

    I needed to sum the total checks and discounts taken by quarter, which I did with this formula:

    =SUMPRODUCT(--(Data!CkDate>=DATEVALUE("1/1/2011")),--(Data!CkDate<=DATEVALUE("3/31/2011")),Data!CkAmnt) (Note: substituted DiscAmnt for CkAmnt to sum discounts taken)


    I was also able to count the number of checks:
    =SUMPRODUCT(--(Data!CkDate>=DATEVALUE("1/1/2011")),--(Data!CkDate<=DATEVALUE("3/31/2011")))

    Now I am trying to count checks by customers or checks that I took discounts when paying, using this formula which did NOT work.

    =SUMPRODUCT(--AND((Data!CkDate>=DATEVALUE("1/1/2011")),Data!AllowAmnt>0),--AND(Data!CkDate<=DATEVALUE("3/31/2011"),Data!DiscAmnt>0))

    The result is always zero (0).

    And if I use this formula I get #Value! error:

    =SUMPRODUCT(AND(--(Data!CkDate>=DATEVALUE("1/1/2011")),--(Data!CkDate<=DATEVALUE("3/31/2011"))),Data!DiscAmnt>0)

    I also used this formula giving zero (0).

    =SUMIFS(Data!CKAmnt,Data!CkDate,Data!CkDate>=DATEVALUE("1/1/2011"),Data!CkDate,Data!CkDate<=DATEVALUE("3/31/2011"),Data!DiscAmnt,Data!DiscAmnt>0)

    Anybody can figure what I am doing wrong?

    I appreciate any help and thanks in advance.
    Last edited by NBVC; 03-06-2012 at 10:24 AM. Reason: Assumed Solved per Rep

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count with multiple criteria

    How about?

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1