+ 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
    Thanks for your help but it doesn't work. We're all puzzling over this one at the office!

  2. #2
    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?
    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
    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!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Unfortunately Countifs() was not available in versions before 2007.

    Also, Sumproduct does not allow for Full column references, like E:E (at least in versions prior to 2007).

    To get the Sumproduct() formula to work when physically entering the date, you need to convert the date string into numerical with something like +0

    e.g. ==Sumproduct(--(AL2:AL100="pass"),--(E2:E100>="3/18/2007"+0),--(E2:E100<="3/24/2007"+0))

  5. #5
    Registered User
    Join Date
    09-12-2007
    Posts
    5
    Ah, thanks for the explanation. Thank god for 2007. I didn't want to upgrade, but now I've seen the light.

    Thanks alot for your help. I'm sure I'll be hanging around since I use excel all day at work.

    Thanks again!

+ 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