+ Reply to Thread
Results 1 to 6 of 6

Using AUTOFILTER with FREQUENCY - ?

  1. #1
    Registered User
    Join Date
    12-10-2008
    Location
    N/A
    Posts
    3

    Using AUTOFILTER with FREQUENCY - ?

    Hi All,

    I have the following data and have created the FREQUENCY distribution below it.

    Ideally, what I want is to be able to see the frequency distribution and use AUTOFILTER on the dates to see the FREQUENCY distribution is for various dates or combinations of dates.

    However, the frequency distribution doesn't seem to get updated when the autofilter is applied.

    Ideas and comments welcome!


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    Try using the SUBTOTAL function ot define your frequency values.
    The formula will recalculate to account for visible/hidden rows as the autofilter is changed.
    Kieran

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Assuming your dates are in A2:A11 and categories in B2:B11, then with a specific category in D1 this formula in E1 will count the visible matching categories only

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(B2,ROW(B$2:B$11)-ROW(B$2),0)),--(B$2:B$11=D1))

    drag formula down for counts of categories in D2, D3 etc.....

  4. #4
    Registered User
    Join Date
    12-10-2008
    Location
    N/A
    Posts
    3
    Thanks Kieran, I had considered that, unfortunately there are several columns (apart from date) I want to filter on in the real example...

  5. #5
    Registered User
    Join Date
    12-10-2008
    Location
    N/A
    Posts
    3
    Thanks for your reply ddll!
    I'm still trying to get my brain around your solution!
    (I've never used OFFSET or SUMPRODUCT before!)

    It doesn't quite work right but i'll debug it.
    What does the "- -" mean at the end of your formula?
    --(B$2:B$11=D1))

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by zerocred View Post
    It doesn't quite work right but i'll debug it.
    What does the "- -" mean at the end of your formula?
    --(B$2:B$11=D1))
    (B$2:B$11=D1) gives you an array of TRUE/FALSE values. These need to be converted to 1/0 values which is what the -- does. You could also do that several other ways e.g.

    (B$2:B$11=D1)+0

    Note: for "copying down" purposes I should have included an extra $ in the first B2, i.e.

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(B$2,ROW(B$2:B$11)-ROW(B$2),0)),--(B$2:B$11=D1))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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