+ Reply to Thread
Results 1 to 12 of 12

Countifs Multiple Criteria

Hybrid View

  1. #1
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Countifs Multiple Criteria

    One way would be to add a helper column which returns 1 for each row if any of the relevant values equal 1. Then a simple SUM formula can sum up the 1s and 0s in that helper column. The helper column formula would be something like this, copied down the column:
    =AND(D2="abc",OR(AO2=1,AS2=1))+0
    Another option would be to adapt your COUNTIFS formula like this:
    =COUNTIFS(ccs_export!$D:$D,"abc",ccs_export!$AO:$AO,1)
        +COUNTIFS(ccs_export!$D:$D,"abc",ccs_export!$AS:$AS,1)
        -COUNTIFS(ccs_export!$D:$D,"abc",ccs_export!$AO:$AO,1,ccs_export!$AS:$AS,1)
    This option would not be practical for the potential combinations of 15 COUNTIFS() functions.

    Another option would be to use SUMPRODUCT.
    =SUMPRODUCT(--(ccs_export!$D:$D="abc"),--(((ccs_export!$AO:$AO=1)+(ccs_export!$AS:$AS=1))>0))
    If you go for the SUMPRODUCT option, try not to use whole column references because it will slow your workbook down.
    Last edited by Colin Legg; 08-09-2011 at 12:06 PM.
    Hope that helps,

    Colin

    RAD Excel Blog

  2. #2
    Registered User
    Join Date
    03-23-2007
    Posts
    91

    Re: Countifs Multiple Criteria

    So basically since I can't add an extra column, Sumproduct would solve the problem?

+ 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