+ Reply to Thread
Results 1 to 2 of 2

CountIF on Filtered data

Hybrid View

  1. #1
    Steadman
    Guest

    CountIF on Filtered data

    I have a column of Data that I use a filter on to get desired records. In
    some of the columns I have answers like A, B, C and I do a
    COUNTIF(CELLRANGE, "A") and it works fine for the entire sheet. Is there a
    way to get the countif only to count the items on the filter list.
    Column 1 Column 2
    Male A
    Female A
    Male A
    Female A
    Male B
    Male B
    Female B
    Female B

    So on the countif above I get 4 since 4 are A
    When I do a filter for only Male, I would like the countif to show only 2
    since there are only 2 males that selected A

    Is there a way to do this? Any assistance would be appreciated.




  2. #2
    Bob Phillips
    Guest

    Re: CountIF on Filtered data

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(B1:B100,ROW(B1:B100 )-MIN(ROW(B1:B100 )),,1))*
    (B1:B100="A"))

    --
    HTH

    Bob Phillips

    "Steadman" <me@my.com> wrote in message
    news:upEr3DweFHA.1384@TK2MSFTNGP09.phx.gbl...
    > I have a column of Data that I use a filter on to get desired records. In
    > some of the columns I have answers like A, B, C and I do a
    > COUNTIF(CELLRANGE, "A") and it works fine for the entire sheet. Is there

    a
    > way to get the countif only to count the items on the filter list.
    > Column 1 Column 2
    > Male A
    > Female A
    > Male A
    > Female A
    > Male B
    > Male B
    > Female B
    > Female B
    >
    > So on the countif above I get 4 since 4 are A
    > When I do a filter for only Male, I would like the countif to show only 2
    > since there are only 2 males that selected A
    >
    > Is there a way to do this? Any assistance would be appreciated.
    >
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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