+ Reply to Thread
Results 1 to 2 of 2

COUNTIF specific text on visible cells

Hybrid View

  1. #1
    Registered User
    Join Date
    09-15-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    64

    COUNTIF specific text on visible cells

    i have a list of 164 stocks on the sheet. each has an associated sector to it. if i include all 164, i want to create a simple pie chart showing the breakdown. so total data on Column A and B, column D and E show the breakdown. im sure COUNTIF formula in column E.
    easy enough.

    now, lets say i want to filter some out in column B, lets say we want to remove all communications sector, or hide them. how do i get column E to reflect that and show 0, instead of 3?

    thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: COUNTIF specific text on visible cells

    =SUMPRODUCT(($B$3:$B$200=D7)*(SUBTOTAL(103,OFFSET($B$3,ROW($B$3:$B$200)-MIN(ROW($B$3:$B$200)),0))))

    will countif visible cells. If you then use the data in the chart (currently it is using externally held data which I cannot access, then turn the 0 into a #N/A error.
    =IFERROR(1/(1/SUMPRODUCT(($B$3:$B$200=D7)*(SUBTOTAL(103,OFFSET($B$3,ROW($B$3:$B$200)-MIN(ROW($B$3:$B$200)),0))))),NA())

    Excel will ignore, and not plot, the NA values.


    Then use this:
    =SUBTOTAL(3,$B$3:$B$200)

    to return the total numbe rof visible rows.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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] Need formula to COUNTIF specific TEXT, for only visible cells
    By Kirk3737 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2019, 12:17 AM
  2. [SOLVED] COUNTIF cells contain a specific word anywhere within the text string
    By RoundaboutCJP in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-18-2018, 12:38 PM
  3. Countif to include any number or specific text in merged cells
    By Brewdawg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2015, 06:29 PM
  4. [SOLVED] COUNTIF visible cells matching specific criteria
    By MP1989 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2015, 06:07 PM
  5. Countif to visible cells only
    By kokapelly in forum Excel General
    Replies: 9
    Last Post: 11-05-2014, 11:37 AM
  6. [SOLVED] COUNTIF search range of cells for multiple specific text.
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2013, 06:38 PM
  7. Getting range of cells with specific text colour, then using in a COUNTIF formulae
    By cheekyflash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2006, 08:58 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