+ Reply to Thread
Results 1 to 5 of 5

How can I count cells in a filtered column within a criteria...

  1. #1
    Registered User
    Join Date
    01-21-2005
    Posts
    5

    How can I count cells in a filtered column within a criteria...

    I've got a formula to count cells in a filtered column within a criteria (<=2):
    =SUMPRODUCT((SUBTOTAL(3,OFFSET(I18:I42,ROW(I18:I42)-MIN(ROW(I18:I42)),0,1)))*(I18:I42={0,1,2}))

    But now I need to count cells in a filtered column that meet the criteria of having 'Y' in the cell, as in for yes or no. Does anyone have a formula for that or can someone help me modify the formula I have? Thanks soooooooo much!!!
    Lizette

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that the new criterion is in addtion to the old one, and that Column J contains your "Y" and "N" values...

    =SUMPRODUCT(--(SUBTOTAL(3,OFFSET(I18:I42,ROW(I18:I42 )-MIN(ROW(I18:I42)),0,1))),--(I18:I42<=2),--(J18:J42="Y"))

    Hope this helps!

    Quote Originally Posted by lizettegr
    I've got a formula to count cells in a filtered column within a criteria (<=2):
    =SUMPRODUCT((SUBTOTAL(3,OFFSET(I18:I42,ROW(I18:I42)-MIN(ROW(I18:I42)),0,1)))*(I18:I42={0,1,2}))

    But now I need to count cells in a filtered column that meet the criteria of having 'Y' in the cell, as in for yes or no. Does anyone have a formula for that or can someone help me modify the formula I have? Thanks soooooooo much!!!
    Lizette

  3. #3
    Registered User
    Join Date
    01-21-2005
    Posts
    5

    thanks for your help again!!

    Hey domenic, thanks again for your help. however the Y criteria is not in addition to the less than or equal to 2. I just need to count the cells that have a Y in them. Can you still help? how do you know soo much!

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that Column J contains your "Y" and "N" values (you didn't specify )...

    =SUMPRODUCT(--(SUBTOTAL(3,OFFSET(I18:I42,ROW(I18:I42 )-MIN(ROW(I18:I42)),0,1))),--(J18:J42="Y"))

    Adjust the reference, if needed.

    Hope this helps!

    Quote Originally Posted by lizettegr
    Hey domenic, thanks again for your help. however the Y criteria is not in addition to the less than or equal to 2. I just need to count the cells that have a Y in them. Can you still help? how do you know soo much!

  5. #5
    Registered User
    Join Date
    01-21-2005
    Posts
    5

    Thanks Again!

    That Works Perfectly! Thanks!

+ 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