+ Reply to Thread
Results 1 to 3 of 3

Counting lines that meet TWO criteria

  1. #1
    sam
    Guest

    Counting lines that meet TWO criteria

    Search turned up nada on this:

    How do I write a countif statement that says to include the line in the
    count if the date on that line is between 10/01/05 and 12/31/05?

    I’ve even tried a couple:

    =IF(AND(F5:F98>9/30/2005,F5:F98<1/1/2006),COUNTA(F5:F98),"")
    =IF(AND(F5:F98>9/30/2005,F5:F98<1/1/2006),COUNT(F5:F98),"")

    Do I have bad syntax, bad logic, bad formula use? Do dates have to be
    written out differently?


    Thanks to anyone who takes the time to respond.

    Sam


  2. #2
    Bob Phillips
    Guest

    Re: Counting lines that meet TWO criteria

    =SUMPRODUCT(--(F5:F98>--"2005-09-30"),--(F5:F98<--"2006-01-01"))


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "sam" <sam@discussions.microsoft.com> wrote in message
    news:214C6DED-D1EF-4B8B-A362-0CD4A0806FC7@microsoft.com...
    > Search turned up nada on this:
    >
    > How do I write a countif statement that says to include the line in the
    > count if the date on that line is between 10/01/05 and 12/31/05?
    >
    > I've even tried a couple:
    >
    > =IF(AND(F5:F98>9/30/2005,F5:F98<1/1/2006),COUNTA(F5:F98),"")
    > =IF(AND(F5:F98>9/30/2005,F5:F98<1/1/2006),COUNT(F5:F98),"")
    >
    > Do I have bad syntax, bad logic, bad formula use? Do dates have to be
    > written out differently?
    >
    >
    > Thanks to anyone who takes the time to respond.
    >
    > Sam
    >




  3. #3
    Bernard Liengme
    Guest

    Re: Counting lines that meet TWO criteria

    See http://www.xldynamic.com/source/xld.SUMPRODUCT.html
    You might need to use syntax such as
    =sumproduct(--(F5:F98>DATE(2005,9,30)), --(F5:F98<DATE(2006,1,1))
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "sam" <sam@discussions.microsoft.com> wrote in message
    news:214C6DED-D1EF-4B8B-A362-0CD4A0806FC7@microsoft.com...
    > Search turned up nada on this:
    >
    > How do I write a countif statement that says to include the line in the
    > count if the date on that line is between 10/01/05 and 12/31/05?
    >
    > I've even tried a couple:
    >
    > =IF(AND(F5:F98>9/30/2005,F5:F98<1/1/2006),COUNTA(F5:F98),"")
    > =IF(AND(F5:F98>9/30/2005,F5:F98<1/1/2006),COUNT(F5:F98),"")
    >
    > Do I have bad syntax, bad logic, bad formula use? Do dates have to be
    > written out differently?
    >
    >
    > Thanks to anyone who takes the time to respond.
    >
    > Sam
    >




+ 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