+ Reply to Thread
Results 1 to 5 of 5

Countif on filtered rows

  1. #1
    Registered User
    Join Date
    05-20-2012
    Location
    Bury St Edmunds, England
    MS-Off Ver
    Excel 2007
    Posts
    15

    Countif on filtered rows

    Hi, I am trying to count the number of visible cells containing different values in a filtered column, but I can't find a way to combine the Subtotal and Countif functions. Is this possible? My row range is L4:L87 and the values I want to be able to count the number of occurrences of are "1", "1.25", "2" and "2.50". Many thanks for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Countif on filtered rows

    Is there any specific reaon why you are filtering your data? If it's because you have multiple criteria, then you can use =COUNTIFS().
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Countif on filtered rows

    Try this,

    Please Login or Register  to view this content.
    Assume L4:L87 formatted or entered as text, ie. to get 2.50
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Countif on filtered rows

    Try this formula to count visible 1.25 values

    =SUMPRODUCT(SUBTOTAL(2,OFFSET(L4,ROW(L4:L87)-ROW(L4),0))*(L4:L87=1.25))
    Audere est facere

  5. #5
    Registered User
    Join Date
    05-20-2012
    Location
    Bury St Edmunds, England
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Countif on filtered rows

    Hi all, thanks for that, both solutions work brilliantly (Soren, I have to filter the rows because of other criteria in different columns). Much appreciated.

+ 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