+ Reply to Thread
Results 1 to 7 of 7

COUNTIFS for visible cells only

  1. #1
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    COUNTIFS for visible cells only

    Hi, I am looking for a COUNTIFS that is only looking only at the visible cells. I have found a few threads on this subject but none for this specific problem. So if an UDF for this won't be very complicated, please help.
    I know there is a SUMPRODUCT / SUBTOTAL excel solution for COUNTIFSing visible cells only but it doesn't make any sense to me..
    I found this to be working but I don't know how modify it to take multiple ranges and criteria like CONUTIFS does

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: COUNTIFS for visible cells only

    You need a helper column (let's say M) where you type: =SUBTOTAL(103,RefCell) where RefCell is where you filter by.

    then, for COUNTIF do this: =COUNTIF(M:M,1)

    this will count for you only the visible rows.
    Click on the star if you think I helped you

  3. #3
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: COUNTIFS for visible cells only

    Thanks for the idea I will look into it
    Will this work for COUNTIFS also?

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: COUNTIFS for visible cells only

    yes, it is also applicable for COUNTIFS

  5. #5
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: COUNTIFS for visible cells only

    I have found this piece of code, is there any way to make it work for COUNTIFS?

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: COUNTIFS for visible cells only

    Adyteo, if only I had listened to you in the first place... but you lost me on the "RefCell part and I didn't want to bother you with questions.
    So this solved by adding a helper column with a SUBTOTAL(103,A1) for example ,that will determine if the cell you are interested in is hidden or not.
    As for the modified UDF part, it's very complicated and not worth the trouble.
    Last edited by bibu; 04-13-2014 at 09:16 AM.

  7. #7
    Registered User
    Join Date
    04-14-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: COUNTIFS for visible cells only

    Thanks bibu. That code was very helpful.

+ 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] COUNTIFS on visible cells only
    By ExcelHelp23 in forum Excel General
    Replies: 10
    Last Post: 11-07-2019, 06:46 PM
  2. [SOLVED] use countifs ( using condition) only on visible rows
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-18-2012, 01:30 PM
  3. Code for Countifs on visible cells only
    By ExcelHelp23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2012, 08:23 PM
  4. Excel 2007 : COUNTIF and COUNTIFS on Visible Cells Only
    By aaron1976 in forum Excel General
    Replies: 8
    Last Post: 03-09-2012, 06:27 PM
  5. COUNTIFS on Visible Cells only
    By aaron1976 in forum Excel General
    Replies: 4
    Last Post: 03-09-2012, 08: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