+ Reply to Thread
Results 1 to 4 of 4

counting filtered values

  1. #1
    Registered User
    Join Date
    05-10-2019
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    31

    counting filtered values

    Hi Community
    I was wondering if anyone can help me with the following
    I have a sheet that contains about 20 columns, when I filter on one column I want to sum and Average that column which I can do with the aggregrate function
    The thing I cant do is -1. Count values over zero and 2. Count the values less than zero (on the filtered values only)
    Any help would be appreciated
    Cheers
    Brian

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: counting filtered values

    One way would be to use a helper column with a SUBTOTAL formula using count.
    This would then contain a 1 or 0 depending on whether hidden or not.

    You can then use a SUMPRODUCT formula to test column to be summed or averaged has a positive or negative value, multiple that by value and helper column value.

    Small example attached
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    05-10-2019
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    31

    Re: counting filtered values

    Thank you for your reply Andy (and demo sheet!)
    Is there a formula to count the values over zero, and the values under zero?
    In your example the answer would be 2 above zero and 2 below zero
    Cheers
    Brian

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: counting filtered values

    Yes, just modify the formula so only the helper column is counted
    So modified formula for less than zero would be

    =SUMPRODUCT((D8:D16<0)*(E8:E16))

+ 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] Counting Unique Text Values When Filtered
    By mzagha in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-30-2019, 05:17 AM
  2. Counting values in a filtered row
    By Davidx123 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-21-2012, 07:08 PM
  3. counting "true" values but using filtered data
    By andyr85 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-28-2010, 08:55 AM
  4. Help Please-Counting Filtered Rows
    By baz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2005, 02:00 PM
  5. counting filtered items
    By CLR in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-06-2005, 05:05 PM
  6. counting filtered items
    By mar10 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  7. counting filtered items
    By mar10 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  8. Counting the Values that Match Criteria in a Filtered List
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-28-2005, 10:38 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