+ Reply to Thread
Results 1 to 6 of 6

CountIF in Autofilter does not work.

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    CountIF in Autofilter does not work.

    Hi,

    Can anyone help me, the code does not work with filtering function (it returns inaccurate calculation)

    However, if I remove filter function & exclude .SpecialCells(xlCellTypeVisible). it working fine, I'm really confused

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: CountIF in Autofilter does not work.

    confused what you are trying to achieve
    why dont you do countifs instead of trying to get autofilter to be your criteria?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: CountIF in Autofilter does not work.

    Hi humdingaling,

    I'm just want to try combining both methods but seems it does not work. eventhough i have include .SpecialCells(xlCellTypeVisible) in the range.


    P/S I know, it can be solved by either autofilter or countifs

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: CountIF in Autofilter does not work.

    i dont think countif and specialcells visible is compatible to be combined like that

    Debugging specialcells visible
    returns results as individual cell address and not a single range
    ie D2,d24,d50,etc

    so when you try to put that into countif...it has syntax issues

    you could probably dissect the SpecialCells into individual ranges and then force an outcome out but you already have diverted from your original single countif formula and you really need to be questioning why you are doing it this way when you already have other simpler solutions that already work

    that's just making it complicated for the sake of being complicated
    Last edited by humdingaling; 07-25-2014 at 01:47 AM.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: CountIF in Autofilter does not work.

    What about using CountifS() and passing those filter conditions in countifS() formula itself?

    "Business Banking" and "RM", "SRM", "SBDM"


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  6. #6
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: CountIF in Autofilter does not work.

    Hi sixthsense,

    Yes, as mentioned above, I have done it before it works by either using countIfs or filter. but i'm just want to try combining both methods but it does not work.

    Ok, thanks your clarification & opinion.

+ 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] COUNTIF on an autofilter?
    By gordo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-30-2018, 06:54 AM
  2. Countif after autofilter
    By hommeg in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-12-2013, 09:33 AM
  3. [SOLVED] Countif with Autofilter
    By ctrapper in forum Excel General
    Replies: 14
    Last Post: 05-30-2012, 01:35 PM
  4. Excel 2007 : Will autofilter work?
    By cliffshow in forum Excel General
    Replies: 1
    Last Post: 08-20-2011, 03:42 PM
  5. Autofilter Does not work
    By jhc8255 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2011, 09:34 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