+ Reply to Thread
Results 1 to 2 of 2

Countif on filtered data - how does it work?

Hybrid View

kramerica Countif on filtered data -... 07-22-2012, 07:35 AM
martindwilson Re: Countif on filtered data... 07-22-2012, 07:45 AM
  1. #1
    Registered User
    Join Date
    07-22-2012
    Location
    Earth
    MS-Off Ver
    Excel 2003
    Posts
    1

    Countif on filtered data - how does it work?

    I needed to apply countif on filtered data. As always, a quick google search and I found the solution:
    =SUMPRODUCT(SUBTOTAL(3,OFFSET(Y9:Y202,ROW(Y9:Y202)-ROW(Y9),0,1)),--(Y9:Y202="X"))

    Now, I have a very basic understanding of SUMPRODUCT, SUBTOTAL and even OFFSET, but there is one thing that I can't understand. The "ROW(Y9:202)-ROW(Y9)" should return 0. Obviously it doesn't, since the OFFSET function wouldn't work with that, but I don't understand why? What am I missing here?

    Thanks a lot..

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Countif on filtered data - how does it work?

    ROW(Y9:Y202) is not 9 it is {9,10,11,12,13,14...........201,202} take row(y9) ie 9 of that you get {0,1,2,4,5......192,193}
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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