+ Reply to Thread
Results 1 to 3 of 3

CountIFs with SUBTOTAL

  1. #1
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    CountIFs with SUBTOTAL

    Hi Experts,

    I found this formula for a Countif with SUBTOTAL courtesy of Biff:

    SUMPRODUCT(SUBTOTAL(3,OFFSET(Q10:Q96,ROW(Q10:Q96)-ROW(Q10),0,1)),--(Q10:Q96="SL"))

    How do I modify the formula if I'm counting multiple conditions? I'm currently using this:

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(Q10:Q96,ROW(Q10:Q96)-ROW(Q10),0,1)),--(Q10:Q96="SL"))+SUMPRODUCT(SUBTOTAL(3,OFFSET(Q10:Q96,ROW(Q10:Q96)-ROW(Q10),0,1)),--(Q10:Q96="AWOL"))+SUMPRODUCT(SUBTOTAL(3,OFFSET(Q10:Q96,ROW(Q10:Q96)-ROW(Q10),0,1)),--(Q10:Q96="NCNS"))

    Is there a better way of writing the formula?

    Thank you,
    If I've helped U pls click on d *Add Reputation

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: CountIFs with SUBTOTAL

    Try this

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(Q10:Q96,ROW(Q10:Q96)-ROW(Q10),0,1)),--ISNUMBER(MATCH(Q10:Q96,{"SL","AWOL","NCNS"},0)))
    Audere est facere

  3. #3
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: CountIFs with SUBTOTAL

    works like a charm. Thank you so much!!!

+ 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. SUBTOTAL and COUNTIFS combination
    By aaron_burr in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-07-2020, 12:52 AM
  2. [SOLVED] COUNTIF and COUNTIFS with SUBTOTAL
    By JFactor in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-26-2015, 05:51 PM
  3. [SOLVED] How to Subtotal Countifs with 3 criteria?
    By ExcelFledgling in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-03-2015, 03:53 PM
  4. Countifs with subtotal
    By eleaca in forum Excel General
    Replies: 5
    Last Post: 01-04-2015, 12:44 PM
  5. [SOLVED] COUNTIFS and SUBTOTAL Functions Help
    By kapeller in forum Excel General
    Replies: 8
    Last Post: 09-15-2014, 06:23 PM
  6. Subtotal and Countifs
    By pisgah in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2013, 02:14 PM
  7. Subtotal for countifs function
    By guyzk1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2013, 04:39 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