+ Reply to Thread
Results 1 to 5 of 5

Count Dates Within A Range

  1. #1
    Registered User
    Join Date
    03-04-2011
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Count Dates Within A Range

    I used a COUNTIF example from another thread as a guide for my own spreadsheet and cannot return the correct numbers:

    This example for returning a count of dates within a range:

    =COUNTIF(A:A, ">=1.7.2010")-COUNTIF(A:A,">31.7.2010")

    Became in my workbook:

    =COUNTIF('Jan 2010'!L:L, ">=Sheet5!B3")-COUNTIF('Jan 2010'!L:L,">Sheet5!C3")

    Perhaps I am missing something basic such as date formatting, as I'm just now starting to learn how to use formulas. Can anyone help me with this formula in E3, Sheet 5? (please see attached file "CY 2010 to CY 2011")

    Best Wishes,

    Keith
    Attached Files Attached Files
    Last edited by KJernigan; 03-04-2011 at 04:49 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Count Dates Within A Range

    When you use "" that mean you dealing with text values..

    To deal with references you must use them out of ""

    =COUNTIF('Jan 2010'!L:L, ">="&Sheet5!B3)-COUNTIF('Jan 2010'!L:L, ">"&Sheet5!C3)


    try use this solution because I have problem with dates so I can not test it.

  3. #3
    Registered User
    Join Date
    03-04-2011
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Count Dates Within A Range

    The value returned is 0 so I must have something misformatted or a similar problem. I have attached my updates which you suggested in case someone can test it. Thanks for your help!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Count Dates Within A Range

    Following up on zbor, in col L (sheet jan 2010) your dates are text looking like dates, not real dates

    Select this column - Go to data - text to columns - Click "Next" twice In the Column data format box select "date" and "MDY' in the dropdown box. Finish Your dates will now move to the right of the cell and if you have followed zbor's advice the results will come up.

    If MDY does not work you can try other combinations

  5. #5
    Registered User
    Join Date
    03-04-2011
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Count Dates Within A Range

    That is the ticket! Thank you BOTH very much! The data is imported from a Crystal Reports file where it is converted to Excel worksheet, so that is probably why it is text and not a true date.

    Thanks again! I have attached the updated workbook.

    Best Wishes,

    Keith
    Attached Files Attached Files

+ 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