+ Reply to Thread
Results 1 to 7 of 7

Combining CountIf with an OR function

  1. #1
    Registered User
    Join Date
    05-21-2021
    Location
    Bethlehem, Palestine
    MS-Off Ver
    2013
    Posts
    13

    Combining CountIf with an OR function

    Hello
    excel.png
    i want a formula to count if D column = 0 and E column=AR and if L or M column have "/" sign in them.

    thanks in advance

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,784

    Re: Combining CountIf with an OR function

    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Combining CountIf with an OR function

    Agree a sample WB will help, but try using countifS() function, instead of just countif()
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,915

    Re: Combining CountIf with an OR function

    Countifs does not support the OR() function, you can use SUMPRODUCT:

    =SUMPRODUCT((D2:D10=0)*(E2:E10="AR")*ISNUMBER(SEARCH("/",L2:L10&M2:M10)))

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Combining CountIf with an OR function

    Quote Originally Posted by Phuocam View Post
    Countifs does not support the OR() function, you can use SUMPRODUCT:

    =SUMPRODUCT((D2:D10=0)*(E2:E10="AR")*ISNUMBER(SEARCH("/",L2:L10&M2:M10)))
    Agreeed, but I figured 1 or the other would have 1 so count them both.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,915

    Re: Combining CountIf with an OR function

    OP didn't have the expected result, so I can't test it.

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Combining CountIf with an OR function

    Quote Originally Posted by FDibbins View Post
    Agreeed, but I figured 1 or the other would have 1 so count them both.
    I believe ISNUMBER(SEARCH("/",L2:L10&M2:M10)) count 1 if there was at least one "/" in both columns.
    Quang PT

+ 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. [SOLVED] Help with combining if and countif in one function
    By Boheret5an in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-22-2021, 02:58 AM
  2. Combining AND OR with COUNTIF
    By robwags in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-11-2018, 02:35 PM
  3. Combining a CountIF Function for two Criteria
    By stevez_86 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2014, 11:25 AM
  4. [SOLVED] Combining COUNTIF function and filtering
    By NewbyUK in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-13-2013, 07:39 AM
  5. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  6. [SOLVED] combining countif with AND function
    By Daesthai in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2005, 01:05 AM
  7. Combining COUNTIF and LEN
    By Guido Cole in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-11-2005, 06:06 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