+ Reply to Thread
Results 1 to 3 of 3

Thread: Filters and countif formulae

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

    Filters and countif formulae

    Hi, I would really appreciate some help with this. I am a teacher and I am putting together a spreadsheet for data to be entered. I have a table underneath which contains lots of different countif formulae so for example If test 1 is in column C and kids are graded different levels I can return how many kids got each level. Thats fine if I am looking at the whole year group but I also have a filter and I would like the table to return different values depending on the filter I select eg. counts all data if I filter all or just counts data from say Class 8A1.

    I am stuck!! Please can someone help!

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    3,788

    Re: Filters and countif formulae

    Not sure exactly what you need, but check out the SUBTOTAL formula.

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

    Re: Filters and countif formulae

    Try adding a "helper" column which will return a 1 if that row is visible, a zero otherwise, e.g. in Z2 copied down

    =SUBTOTAL(3,A2)

    [assumes that column A is populated througout]

    Now if you want to count "y"s in column G for example you can use a SUMPRODUCT formula like this to count them only in the filtered rows

    =SUMPRODUCT((Z2:Z100=1)*(G2:G100="y"))

    edit: or as you have Excel 2007 you can use COUNTIFS i.e.

    =COUNTIFS(Z2:Z100,1,G2:G100,"y")
    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