+ Reply to Thread
Results 1 to 5 of 5

Thread: counting "true" values but using filtered data

  1. #1
    Registered User
    Join Date
    08-18-2010
    Location
    Worcester
    MS-Off Ver
    Excel 2007
    Posts
    8

    counting "true" values but using filtered data

    How do you count true values in a column but allowing for filtered data. I tried using sum product but I think you must need numerical data! Any help will be much appreciated.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: counting "true" values but using filtered data

    Probably something like this:

    =SUMPRODUCT(SUBTOTAL(3,OFFSET($B$1:$B$100,ROW($B$1:$B$100)-MIN(ROW($B$1:$B$100)),,1)),--($B$1:$B$100=TRUE))

    where B1:B100 is the original range holding the TRUE/FALSE values.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057

    Re: counting "true" values but using filtered data

    Suppose you have data in F2:F100 this formula will count only the visible TRUEs after filtering

    =SUMPRODUCT((F2:F100=TRUE)*SUBTOTAL(3,OFFSET(F2,ROW(F2:F100)-ROW(F2),0)))
    Audere est facere

  4. #4
    Registered User
    Join Date
    08-18-2010
    Location
    Worcester
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: counting "true" values but using filtered data

    Sorry I couldn't get this to work....do all values in F2:F100 need to be either true or false??

  5. #5
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057

    Re: counting "true" values but using filtered data

    No, the formula should just count TRUE values, the others can be anything as long as they aren't error values. Did you use the exact formula I suggested or a variation?
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0