+ Reply to Thread
Results 1 to 8 of 8

formula to count certain cell value based on date range

Hybrid View

  1. #1
    Registered User
    Join Date
    09-12-2007
    Posts
    5

    formula to count certain cell value based on date range

    Hi. My last thread was deleted, probably because my subject was not concise enough.

    I need help with a formula. Here's what I'm wanting to do:

    I have dates in Column E
    I have pass/fail values in Column AL

    What I want to do is be able to count the number of cells with the value "pass" in column AL based on a range of dates in column E.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try

    =Sumproduct(--(AL2:AL100="pass"),--(E2:E100>=X1),--(E2:E100<=X2))

    adjust ranges to suit..

    where X1 and X2 house your start/end dates.
    Where there is a will there are many ways.

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

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

  3. #3
    Registered User
    Join Date
    09-12-2007
    Posts
    5
    Thank you! I'll go try it now!!

  4. #4
    Registered User
    Join Date
    09-12-2007
    Posts
    5
    Thanks for your help but it doesn't work. We're all puzzling over this one at the office!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How doesn't it work?

    Did you enter start/end dates in 2 cells and reference them? Or did you try entering dates directly into the formula?

  6. #6
    Registered User
    Join Date
    09-12-2007
    Posts
    5
    I was entering the dates in the forumla and replacing the X1, X2... It was returning a value of 0 no matter what date range I put in.

    I upgraded to Excel 2007 and this formula works perfectly:

    =COUNTIFS(E:E,"<3/24/2007",E:E,">3/18/2007",AL:AL,"Pass")

    Not sure why I couldn't get yours to work. But this on works great. I don't know if the 'COUNTIFS' function was in 2003 but in 2007, it allows you to specify mutliple ranges and criteria, unlike COUNTIF that only allowed one criteria.

    Thanks for your help! Hope my posting back could help someone else too!

+ 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