+ Reply to Thread
Results 1 to 11 of 11

count filtered rows

  1. #1
    Registered User
    Join Date
    09-17-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    15

    count filtered rows

    Hi there,

    I need a formula to count filtered rows with data, i am using formula =SUBTOTAL(103,x:x) but do not want the N/A results to show


    any help greatly appreciated!
    Attached Files Attached Files
    Last edited by Gall47; 09-25-2020 at 04:36 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,452

    Re: count filtered rows

    Administrative note

    Welcome to the forum

    in your haste to solve your problem, you probably missed the yellow banner advising how to get answers faster by posting a sheet ?

    Please take a moment to read it and attach a sheet accordingly.

    Thanks you for helping us help you

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: count filtered rows

    Hi

    Try the function 3 instead 103.
    =SUBTOTAL(3,X:X)

  4. #4
    Registered User
    Join Date
    09-17-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    15

    Re: count filtered rows

    Thanks but this is still counting N/A Cells (which is the result of anthe formula being run)

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: count filtered rows

    Hi

    Try this

    IF you use N/A as text
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    If you use #N/A as error
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-17-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    15

    Re: count filtered rows

    Thank you it is #N/A as error

    When I use the above formula and then filter eg. on name, it is subtracting all the N/S from the subtotal count, not just the filtered range

  7. #7
    Registered User
    Join Date
    09-17-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    15

    Re: count filtered rows

    I am still trying to resolve this and I have attached a better example

    I am trying to count column D that has test scores - I just want to know how many people sat an exam when filtered on another field (eg colour in my example).
    Some of the scores in D are taken from a formula, and some manual entered
    I do not want to include N/A errors in count


    I cannot get this to work when filtering data - can anyone help?
    I have tried
    =SUBTOTAL(3,X:X)-COUNTIF(X:X,NA())
    =SUM(IF(ISERROR(x:x),1))
    =SUM(COUNTIF(x:x,{">0",""}))
    Attached Files Attached Files

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,452

    Re: count filtered rows

    Try =AGGREGATE(3,7,D2:D11)
    Last edited by Pepe Le Mokko; 09-28-2020 at 06:28 AM.

  9. #9
    Registered User
    Join Date
    09-17-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    15

    Re: count filtered rows

    Thank you!!!! =AGGREGATE(3, 7, D2:D11) works :-)

    I've encountered something that I overlooked previously
    Some of the courses have not be completed and have a formula result of "-" I do not want to include these in my count, how to I disregard them?
    I tried to Countif(D2:D11,"-") with the aim to minus this from the total, but this isn't working when I filter the data
    Attached Files Attached Files
    Last edited by Gall47; 09-28-2020 at 06:26 AM.

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,452

    Re: count filtered rows

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)

  11. #11
    Registered User
    Join Date
    09-17-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    15

    Re: count filtered rows

    Apologies, I was not aware. Understand why you have rule now
    Last edited by Gall47; 09-28-2020 at 06:36 PM.

+ 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] Count only a few rows on filtered
    By Berna11 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-08-2019, 06:56 PM
  2. [SOLVED] Hide filtered rows if count > x
    By neobux in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2016, 01:21 PM
  3. Count rows of a filtered range
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2013, 06:30 AM
  4. Count of filtered rows
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 10-30-2012, 06:42 PM
  5. Count only Filtered Rows
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-14-2012, 12:35 AM
  6. [SOLVED] count rows of a filtered list
    By Tim in forum Excel General
    Replies: 1
    Last Post: 02-10-2006, 12:35 AM
  7. How do I count rows in a filtered list when using AutoFilter?
    By chiefcook in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-22-2005, 10:10 AM

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