+ Reply to Thread
Results 1 to 5 of 5

Thread: Conditional CountIf (need to use Autofilters)

  1. #1
    Registered User
    Join Date
    03-14-2011
    Location
    Austin,TX
    MS-Off Ver
    Excel 2003
    Posts
    7

    Conditional CountIf (need to use Autofilters)

    I want to utilize my COUNTIF function with other conditional criteria through autofilter.

    Here is my function:

    =COUNT(IF(FREQUENCY(MATCH(C7:C439,C7:C439,0),MATCH(C7:C439,C7:C439,0))>0,1))


    This is used to count unique employee #s in column C from row 7-439, and it works for getting me a total regardless of filters, but I need to get filtered totals as well.

    I believe there is a way to do this using a SUMPRODUCT function, but I can't seem to figure it out.

    Can someone please point me in the right direction for making the above function compatible with filters?


    Thanks,
    -Alex
    Last edited by NBVC; 03-17-2011 at 07:37 AM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,637

    Re: Conditional CountIf (need to use Autofilters)

    Try:

    =SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(C7:C439,ROW(C7:C4390)-ROW(C7),0,1)),MATCH(C7:C439,C7:C439,0)),ROW(C7:C439)-ROW(C7)+1),1))
    confirmed with CTRL+SHIFT+ENTER not just ENTER
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    03-14-2011
    Location
    Austin,TX
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Conditional CountIf (need to use Autofilters)

    That gets me #N/A

    I should have specified that the values in the column are number and letters (e.g. H57).

    I tried converting the SUM to COUNT, but that just got me "0", which I guess is better than #N/A, but still not what I want.

    =)

    Thanks,
    -Alex

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,637

    Re: Conditional CountIf (need to use Autofilters)

    One of my arrays is a little to big.. fat fingers...

    Try:

    =SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(C7:C439,ROW(C7:C439)-ROW(C7),0,1)),MATCH(C7:C439,C7:C439,0)),ROW(C7:C439)-ROW(C7)+1),1))
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    03-14-2011
    Location
    Austin,TX
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Conditional CountIf (need to use Autofilters)

    Worked like a charm!

    Thank you very much for the help. It is much appreciated.

    Thanks,
    -Alex

+ 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.2.0