+ Reply to Thread
Results 1 to 6 of 6

COUNTIF for filtered data

  1. #1
    Registered User
    Join Date
    03-28-2020
    Location
    New York
    MS-Off Ver
    2016
    Posts
    3

    COUNTIF for filtered data

    Hi,
    I am having trouble creating a COUNTIF function for excel filtered data. I know you have to create the SUMPRODUCT function, but I am unsure what to input. I want to do =COUNTIF(V:V,1,-1) for filtered data only. Any suggestions?
    I tried:
    =SUMPRODUCT(SUBTOTAL(102,OFFSET(V2,ROW(V2:V800)-ROW(V2),,1))*(V2:V800=1))
    but it gives me #VALUE! as result.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: COUNTIF for filtered data

    Hi nataliemur and welcome to the forum,

    I just answered this problem a few hours ago at: https://www.excelforum.com/excel-pro...her-sheet.html

    If you want a better and quicker answer then give us an attached file like the above post did.

    I hope you get a good answer soon.

    Maybe you missed an piece of the formula?
    =SUMPRODUCT(SUBTOTAL(102,OFFSET(V2,ROW(V2:V800)-ROW(V2:V800),,1))*(V2:V800=1))

    Are you counting only numbers (102) or perhaps want to CountA with 103 for both text and numbers?
    Last edited by MarvinP; 03-28-2020 at 09:44 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-28-2020
    Location
    New York
    MS-Off Ver
    2016
    Posts
    3

    Re: COUNTIF for filtered data

    I attached my file , I am not sure what the issue is.
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: COUNTIF for filtered data

    There is a #VALUE! error in cell V3 that needs attention first. That is one of the many reasons we ask for a sample file. We couldn't know that was there without the upload. Array enter this modification of your formula.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  5. #5
    Registered User
    Join Date
    03-28-2020
    Location
    New York
    MS-Off Ver
    2016
    Posts
    3

    Re: COUNTIF for filtered data

    Thanks it works!

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: COUNTIF for filtered data

    You are welcome. Glad to help and thank you for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Countif when cells filtered
    By emmagizer in forum Excel Formulas & Functions
    Replies: 33
    Last Post: 12-21-2017, 02:16 AM
  2. COUNTIF and AVERAGEIF from filtered Data (Still Confused)
    By Buzz1126 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2016, 02:52 PM
  3. How to Countif filtered data
    By thaimic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-07-2016, 08:12 AM
  4. countif greater than on filtered data, then copy the result
    By extremis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2013, 01:48 PM
  5. Replies: 4
    Last Post: 09-04-2012, 06:09 AM
  6. Countif on filtered data - how does it work?
    By kramerica in forum Excel General
    Replies: 1
    Last Post: 07-22-2012, 07:45 AM
  7. CountIF on Filtered data
    By Steadman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2005, 07:05 AM

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