+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    08-29-2007
    Posts
    6

    Requesting a SUMPRODUCT command that will give a count of rows where all of the follo

    Requesting a SUMPRODUCT (or other) command that will give a count of rows where all of the following three things are true:

    column A = P
    (column B = Q or column B = R)
    column C = S
    Last edited by JakePatuli; 08-27-2009 at 10:09 AM.

  2. #2
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,479

    Re: Requesting a SUMPRODUCT command that will give a count of rows where all of the f

    =SUMPRODUCT(--(A1:A10="p"),--(B1:B10="r")+(B1:B10="q"),--(C1:C10="s"))
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Requesting a SUMPRODUCT command that will give a count of rows where all of the f

    Martin, minor point, given you are adding the Boolean output of r & q to give effect of OR clause you need not coerce the r test with double unary, the addition operation will coerce by default, ie:

    Code:
    =SUMPRODUCT(--(A1:A10="p"),(B1:B10="r")+(B1:B10="q"),--(C1:C10="s"))
    Another variant would be

    Code:
    =SUMPRODUCT(--(A1:A10="p"),--ISNUMBER(MATCH(B1:B10,{"q","r"},0)),--(C1:C10="s"))

  4. #4
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,479

    Re: Requesting a SUMPRODUCT command that will give a count of rows where all of the f

    ok but i had a couple of spare - lying around from an old formula and wanted to use them up lol
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,138

    Re: Requesting a SUMPRODUCT command that will give a count of rows where all of the f

    I wanna play!

    =SUMPRODUCT(--(A1:A10&B1:B10&C1:C10={"prs","pqs"}))
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Requesting a SUMPRODUCT command that will give a count of rows where all of the f

    hey, there's only room for one smart-a$$ round here

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.2.0