+ Reply to Thread
Results 1 to 23 of 23

Countif with same criteria in multiple columns

Hybrid View

  1. #1
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,231

    Re: Countif with same criteria in multiple columns

    This?

    =SUMPRODUCT(($A$2:$A$9=$A13)*($C$2:$C$9="Win")*MMULT(--($F$2:$H$9="LM"),{1;1;1}))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  2. #2
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    365 version 2302
    Posts
    22

    Re: Countif with same criteria in multiple columns

    Ah yeah I can make that work. I've amended it to if A11=Any then do that formula, else do your original formula which covers both scenarios. I also want to have the goals for and goals against columns update based on the selected position but I'm not sure I fully understand what MMULT is doing here to be able to apply it. I'll start reading up on it now but if you have a straightforward explanation for this scenario it would be really appreciated!

  3. #3
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    365 version 2302
    Posts
    22

    Re: Countif with same criteria in multiple columns

    Quote Originally Posted by AliGW View Post
    This?

    =SUMPRODUCT(($A$2:$A$9=$A13)*($C$2:$C$9="Win")*MMULT(--($F$2:$H$9="LM"),{1;1;1}))
    Apologies, it was this which seems to be in the ballpark of what I'm trying to do. I've adjusted the formula in B13 to =if($A$11="Any",SUMPRODUCT(($A$2:$A$9=$A13)*($C$2:$C$9="Win")*MMULT(--($F$2:$H$9=$B$11),{1;1;1})),SUMPRODUCT(($A$2:$A$9=$A13)*($C$2:$C$9="Win")*((FILTER($F$2:$H$9,$F$1:$H$1=$A$11)=$B$11)))) which currently works and I can amend "Win" to "Draw" and "Loss" for the other columns. I don't really understand how MMULT is working here though if you're able to clarify.

    I did read through the forum rules although it doesn't mention how to reply. I'm assuming I should be using "Reply with Quote" so hope that makes it easier. Sorry, it's been forever since I've used this type of Forum! Thank you for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Countif using criteria in multiple columns
    By vesterholt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-10-2014, 03:20 PM
  2. CountIf Multiple criteria and columns
    By extko1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-05-2013, 12:35 PM
  3. COUNTIF with multiple criteria and columns
    By burtonlang in forum Excel General
    Replies: 2
    Last Post: 04-10-2013, 05:43 AM
  4. [SOLVED] trying to do a "countif" with multiple ranges and multiple criteria. Countif, Sumproduct?
    By completelyhis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2013, 06:12 PM
  5. [SOLVED] COUNTIF with multiple criteria on several columns (different column heading)
    By rose4emi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-20-2012, 06:41 AM
  6. Countif with criteria in multiple columns
    By syoung236 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-03-2012, 05:10 PM
  7. Replies: 8
    Last Post: 02-10-2009, 08:56 AM
  8. Countif - Two Criteria in two columns are met.
    By samprince in forum Excel General
    Replies: 12
    Last Post: 06-28-2006, 11:58 AM

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