+ Reply to Thread
Results 1 to 6 of 6

COUNTIF (or something similar) for visible cells only after filtering. Please please help

  1. #1
    Registered User
    Join Date
    05-25-2018
    Location
    australia
    MS-Off Ver
    2016
    Posts
    8

    COUNTIF (or something similar) for visible cells only after filtering. Please please help

    Hey guys,

    I have had this problem for a few weeks now but I dont know how to solve it. I have a workbook with some large data sets (500,000 rows x 12 columns) and I am applying some conditional filtering to some of the cells. In each column I have some data that excel checks to see whether or not they fall into a certain range. I check to see if each cell is less a defined small value or greater than a defined greater value. If they are out of range, the cells come up highlighted as red.

    I use COUNTIF to see how many cells are out of range. However, when I filter some cells (based on index for example) the COUNTIF stays the same because it always takes into account hidden cells.

    I would attach my spreadsheet here but its roughly 50mb. I have attached a VI for what I want it to do below (note: This code doesnt work and I just wrote the values manually. This sheet wont work, I just used placeholder values to show a BEFORE for what my sheet currently does, and an AFTER to demonstrate what I want)

    Could I please get some help? How do i ensure the CONUTIF doesnt counts my hidden cells that I use for a particular range? (i.e for each cell that is less than X or greater than Y, highlighted as red, when filtered, how many are there?)

    Thanks


    EDIT: I have attached a file three posts down - Please use that! Thank you!
    Last edited by Muri777; 06-05-2018 at 12:30 AM.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: COUNTIF (or something similar) for visible cells only after filtering. Please please h

    CF formula refers to C5 and B5 cells which are blank. Limits for upward is given in C3 and B3.
    In column J few rows are included and some are left over for CF. What is the criteria for inclusion of cells.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: COUNTIF (or something similar) for visible cells only after filtering. Please please h

    1:
    I use COUNTIF to see how many cells are out of range. However, when I filter some cells ... the COUNTIF stays the same because it always takes into account hidden cells.
    2:
    How do i ensure the COUNTIF counts my hidden cells that I use for a particular range?
    So, what do you want: Include or exclude hidden cells?

    3: What are the criteria/limits for "SIDEWAYS"?
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    05-25-2018
    Location
    australia
    MS-Off Ver
    2016
    Posts
    8

    Re: COUNTIF (or something similar) for visible cells only after filtering. Please please h

    I have attached a workbook with real data sets of only 200 points.

    In worksheet 1 named TranslatingTorus, notice that cell J12 under TELESCOPE has the value 80 in it. This means that there are 80 cells in that column that fall outside of the range given in the top left (In cells B5 and C5). Now enter a value of 5 into Clearance Min (in cell M4) and click translating search. You will notice that the value of 80 has not updated, although you have filtered a bunch of results. I want that 80 to be updated to the correct value when the spreadsheet is filtered. To clear the search, click outside of the top right table and click clear translating search. Please help!!

    I do NOT want to count the values of the hidden cells. When we filter as i mentioned above, the telescope number rout of range should be less than 80. It never updates because it always takes hidden cells.
    Thansk
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: COUNTIF (or something similar) for visible cells only after filtering. Please please h

    SUBTOTAL(102: Count visible...
    i.e.:
    Please Login or Register  to view this content.
    &:
    Please Login or Register  to view this content.


    Clearmax=TranslatingTorus!$N$4
    ClearMin=TranslatingTorus!$M$4
    Criteria=TranslatingTorus!$E$3:$N$4
    CurveMax=TranslatingTorus!$H$4
    CurveMin=TranslatingTorus!$G$4
    LUffMax=TranslatingTorus!$C$4
    LuffMin=TranslatingTorus!$B$4
    ScopeMax=TranslatingTorus!$C$5
    ScopeMin=TranslatingTorus!$B$5
    SlewMax=TranslatingTorus!$C$3
    SlewMin=TranslatingTorus!$B$3
    SumpMax=TranslatingTorus!$F$4
    SumpMin=TranslatingTorus!$E$4
    UJ1Max=TranslatingTorus!$C$6
    UJ1Min=TranslatingTorus!$B$6
    UJ2Max=TranslatingTorus!$C$7
    UJ2Min=TranslatingTorus!$B$7
    XMax=TranslatingTorus!$J$4
    XMin=TranslatingTorus!$I$4
    Zmax=TranslatingTorus!$L$4
    ZMin=TranslatingTorus!$K$4
    Attached Files Attached Files
    Last edited by protonLeah; 06-05-2018 at 09:18 PM.

  6. #6
    Registered User
    Join Date
    05-25-2018
    Location
    australia
    MS-Off Ver
    2016
    Posts
    8

    Re: COUNTIF (or something similar) for visible cells only after filtering. Please please h

    omg that fixed the problem!! thank you SO SO MUCH!!! youre an absolute gem!!!

+ 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] Help with counting the only visible cells after filtering
    By sspreyer in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-27-2017, 03:41 PM
  2. Table Object after filtering - Count visible rows & First visible row
    By limalf in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-13-2013, 07:29 PM
  3. Help with Two Countif for similar cells
    By ExcellentM in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2013, 02:19 PM
  4. Replies: 2
    Last Post: 01-23-2013, 06:56 AM
  5. Apply formula only to visible cells after filtering
    By excelnd in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-28-2012, 06:47 AM
  6. find duplicates for visible cells after filtering for a column
    By sravan.rathnam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 06:41 AM
  7. [SOLVED] Filtering a database then copying visible cells based on CurrentRe
    By Peter Rooney in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-05-2005, 06:05 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