Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Harrisburg, Pennsylvania, USA
    Posts
    44
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Find Dates in Range (Excel 2000 SP3; Win XP)

    Hello, all!
    I'm trying to count the number of dates in a column that fall between a start & end date.
    Column dates are formatted as "date" and not "text."

    I thought I could change the start/end dates to values, then check if the column cells fall in between there - - but I just can't get the gist of text vs. date.

    Could you help?
    tia ~

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Find Dates in Range (Excel 2000 SP3; Win XP)

    Let's say that you have dates in A2:A200, and that you enter the start date in D1 and the end date in D2.
    The following formula will calculate the number of dates in A2:A200 that fall between the start and end dates (included):

    =SUMPRODUCT((A2:A200>=D1)*(A2:A200<=D2))

    or you can use COUNTIF:

    =COUNTIF(A2:A200,"<="&D2)-COUNTIF(A2:A200,"<"&D1)

    Excel tends to format the result of such a formula as a date. Select the cell then select Edit | Clear | Formats to display it as a number.

    Warning: if you read this reply in the e-mail notification, the formulas will probably be mangled. Visit the Excel forum to see what the formulas should look like.

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Harrisburg, Pennsylvania, USA
    Posts
    44
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Re: Find Dates in Range (Excel 2000 SP3; Win XP)

    Perfect! That's awesome!
    I'm so grateful - THANK YOU!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •