+ Reply to Thread
Results 1 to 10 of 10

Count multiple criteria across multiple columns - excluding certain values

  1. #1
    Registered User
    Join Date
    09-10-2017
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    63

    Count multiple criteria across multiple columns - excluding certain values

    Hello Forum

    I am having a hard time with what I think should be a simple formula. I want to count the number of occurrences in one column excluding those that also meet a certain criteria in another column. Looking at the attached worksheet, I want to count the number of time BILLING appears in column B, but only those instances where DISABLED - Canceled does not appear in column AI. Please see screenshot below - I have also attached the worksheet for reference. So in the screenshot below showing rows 1-10 with a header in row 1, the formula would return a count of 7 for BILLING since rows 7&9 also contain DISABLED - Canceled in column AI.

    Like I said, this seems to be an easy ask but I am having a hard time getting a formula that works. I appreciate any help!

    Sample.PNG

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Count multiple criteria across multiple columns - excluding certain values

    Hi,
    Try this:
    =COUNTIFS(B3:B103,"Billing",AH3:AH103,"<>"&"disabled - canceled")

  3. #3
    Registered User
    Join Date
    09-10-2017
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    63

    Re: Count multiple criteria across multiple columns - excluding certain values

    That's great Belinda! Thank you...

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Count multiple criteria across multiple columns - excluding certain values

    you're welcome Jnehra.

  5. #5
    Registered User
    Join Date
    09-10-2017
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    63

    Re: Count multiple criteria across multiple columns - excluding certain values

    The solution you provided worked Belinda, but I have reopened the thread for a follow-up question to the forum.

    Is there a way (FORMULA) to return a list of all the tasks in column F that meet the above criteria? For example, DATAFEED returned 4 matches under the following criteria:

    TYPE: DATAFEED (column B), MATCH: MATCH (column AJ), DMZ OPTION: Does Not Include DISABLED - Cancelled (column AI).
    =COUNTIFS(B3:B103,"Datafeed",AJ3:AJ103,"Match",AI3:AI103,"<>"&"disabled - canceled")

    S6-LA_PE_D-127-OUT
    S6-LA_PE_D-130-OUT
    S6-LA_PE_D-72-OUT-v3.2
    S6-LA_PE_D-74-OUT-v3.2

  6. #6
    Registered User
    Join Date
    09-10-2017
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    63

    Re: Count multiple criteria across multiple columns - excluding certain values

    I was able to get an accurate list using a PIVOT TABLE, just thought I'd ask if there was a way to do this via a formula.

  7. #7
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Count multiple criteria across multiple columns - excluding certain values

    Hi Jnehra,
    are you still using excel 2010?

    In 365 it would be possible with :
    =FILTER(AH3:AH103,(B3:B103="Billing")*(AH3:AH103<>"disabled - canceled"))

    (given in column J)

    you can also wrap it with UNIQUE function to get each value only once:
    =UNIQUE(FILTER(AH3:AH103,(B3:B103="Billing")*(AH3:AH103<>"disabled - canceled")))

    (given in column k)
    Last edited by Limor_OP; 06-22-2022 at 03:03 AM.

  8. #8
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Count multiple criteria across multiple columns - excluding certain values

    If you are using older version try this:

    =INDEX($AH$1:$AH$103,AGGREGATE(15,6,ROW($AH$3:$AH$103)/(($B$3:$B$103="Billing")*($AH$3:$AH$103<>"disabled - canceled")),ROWS($A$1:A1)))
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-10-2017
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    63

    Re: Count multiple criteria across multiple columns - excluding certain values

    Excellent! Thanks again Belinda. I have Office 365 so I'll play around with this a bit to see if it is any easier than the pivot table.

  10. #10
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Count multiple criteria across multiple columns - excluding certain values

    you're welcome Jnehra
    It is recommended to update your profile as well to 365, so you can get the best solution from anyone who offers 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. Count unique values from multiple columns with criteria
    By starter66 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-01-2019, 03:36 AM
  2. [SOLVED] Formula to count matches between multiple columns on different sheets w/ multiple criteria
    By RICK JAMES in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-05-2019, 03:28 PM
  3. How to count using multiple criteria and excluding duplicates
    By Carayk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2018, 01:44 AM
  4. Replies: 11
    Last Post: 11-16-2017, 07:11 AM
  5. Count from a text list, excluding duplicates, with multiple criteria
    By Ecervantes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2017, 10:42 PM
  6. Count unique values across 2 columns with multiple criteria
    By Skywalker01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2012, 08:04 AM
  7. Replies: 11
    Last Post: 06-09-2011, 03:17 PM

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