+ Reply to Thread
Results 1 to 12 of 12

Countif Formula AFTER Table Filter Data

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Countif Formula AFTER Table Filter Data

    Hi

    How do I use a countif formula and ONLY have it apply to data AFTER The filter has been applied in a table?

    I read up on it and only saw a subtotal solution.

    Any help is appreciated.
    Alex

  2. #2
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Countif Formula AFTER Table Filter Data

    Basically I want to count cells that are greater than 5 in column when I select an URL.
    Countif.jpg

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Countif Formula AFTER Table Filter Data

    From looking at the screen shot I would think that the following formula might work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If not, however, I would suggest uploading a sample of the spreadsheet from which the screenshot was taken. Let us know how the filter will be applied and what your expected count is.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Countif Formula AFTER Table Filter Data

    Hi

    Thanks for reply! Sorry for delay, I missed the email alert!

    I've attached the demo files.
    Basically it looks up the url and counts how many are greater than TF 5!

    Really appreciate the help. Was doing this manually and thought there might be a formula for it!
    (Ignore table sorting part of this). We were manually filtering table and checking remaining entries, but it seems this could be done with a formula?
    Attached Files Attached Files

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Countif Formula AFTER Table Filter Data

    Hi,

    Much as suggested already
    =SUMPRODUCT(SUBTOTAL(3,OFFSET($A$2,ROW(Table13[URL])-ROW($A$2),,1))*(Table13[URL]=E2)*(Table13[TrustFlow] > 5))
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Countif Formula AFTER Table Filter Data

    Not sure why you wouldn't put =IF([@TrustFlow]>5,1,0)in cell d3

    then pivot the data, url as row, column1 as the sum,

  7. #7
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Countif Formula AFTER Table Filter Data

    That is awesome! You just saved me from much manual work!

    Rep added!

  8. #8
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Countif Formula AFTER Table Filter Data

    I've got it all working but the formula seems very heavy. It's always taking forever to update the spreadsheet. (I have a few thousand rows and check for TF0>, TF10>, TF20>,TF30>,TF40>,TF50> so it adds up quickly!)

    Is there a less heavy workaround?

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Countif Formula AFTER Table Filter Data

    You can add a separate column to the table with a SUBTOTAL formula in it and then use that instead of the volatile SUBTOTAL/OFFSET combination.

    For example add a new column to the table, called VisCheck with the formula
    =0+SUBTOTAL(103,[@URL])
    then amend the totals formula to
    =COUNTIFS(Table13[VisCheck],1,Table13[URL],F2,Table13[TrustFlow],">5")
    where F2 is the URL cell to look for.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Countif Formula AFTER Table Filter Data

    That would be much better.
    1) Do I need a VisCheck for each test? (I.e. those with TF5+, TF 10+) or is it a general check?
    2) What does this Vischeck column do?

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Countif Formula AFTER Table Filter Data

    Per the attachment it just returns 1 if a row is visible, or 0 if not. You only require one such column.

  12. #12
    Registered User
    Join Date
    01-13-2010
    Location
    Jhb
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Countif Formula AFTER Table Filter Data

    Thanks! Do you know if the following is possible?
    I'm trying to detect if it has foreign anchors in a row and then report back on that?
    Foreign = Non English (I.e. Russian, Chinese, Arabic, etc)
    (i.e. does it contain anything not [^a-zA-z_-0-9])?)

    I've attached Demo2 that has this extra check that I'm doing.

    Is this possible at all?
    Attached Files Attached Files

+ 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. Using Countif with filter formula
    By Mike Santuile in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-31-2016, 05:48 AM
  2. Replies: 1
    Last Post: 01-08-2015, 07:02 PM
  3. COUNTIF Formula when Col has a Filter
    By hammer2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-17-2014, 03:51 AM
  4. COUNTIF formula changing when adding new data to a table.
    By oldraper in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2013, 10:44 AM
  5. Pivot Table - Advanced Filter or Countif in Excel 2007
    By Andjsmith in forum Excel General
    Replies: 1
    Last Post: 07-17-2012, 10:59 AM
  6. Countif Formula between Values from a Data Table
    By mrvp in forum Excel General
    Replies: 4
    Last Post: 03-06-2012, 07:25 PM
  7. countif & sumif formula with filter ?
    By unique1 in forum Excel General
    Replies: 2
    Last Post: 02-28-2012, 03:42 PM

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