+ Reply to Thread
Results 1 to 6 of 6

Count text based on multiple criteria

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    71

    Count text based on multiple criteria

    Okay, so, I am trying to count a win loss record for multiple teams. The team name could be in column B or Column C. So, for each team in the Wins calculation area, I want it to count if the team name is in column B and Column F is "win" AND if the team name is in column C and Column G is "win". I can get it to work with the first set, but not adding the second set of conditions. Please help.
    Attached Files Attached Files
    Last edited by Prcntrygrl; 11-19-2010 at 01:03 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Count text based on multiple criteria

    Try using the SUMPRODUCT function.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Count text based on multiple criteria

    For example, in Cell C30 use:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-28-2007
    Posts
    71

    Re: Count text based on multiple criteria

    thanks. I have actually been trying to use sumproduct.

    This is the formula I was trying to use (in cell C30 (for Brass Knuckle Betties).
    =SUMPRODUCT((B2:B22=B30)*(F2:F22="win")+SUMPRODUCT(C2:C22=B30)*(G2:G22="win"))

    This returns a 1 where the answer should be 2. This team has a 2-0 record.

    Can you maybe tell me what I am doing wrong with this formula?

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Count text based on multiple criteria

    =SUMPRODUCT((B2:B22=B30)*(F2:F22="win"))+SUMPRODUCT((C2:C22=B30)*(G2:G22="win"))
    or
    =SUMPRODUCT((B2:B22=B30)*(F2:F22="win")+(B2:B22=B30)*(G2:G22="win"))
    Last edited by martindwilson; 11-18-2010 at 08:57 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    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

  6. #6
    Registered User
    Join Date
    03-28-2007
    Posts
    71

    Re: Count text based on multiple criteria

    Thank you Cutter, I was able to fix this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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