+ Reply to Thread
Results 1 to 5 of 5

Countif formula for dates

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    Sheffield, UK
    MS-Off Ver
    Excel 2003-2010
    Posts
    56

    Countif formula for dates

    I have a list of dates formatted dd/mm/yy hh:mm I want to be able to count the number of entries for specific dates however I get an error when using countif. Is there a similar formula that can be used.

    As an example say there are 10 rows of data, the dates with time are in column A, I want to them count the number of entries per day for statistics. If anyone can help or needs a better example please let me know.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Countif formula for dates

    What error? What is the formula? What does your data look like?

    Please post a sample workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif formula for dates

    Try something like this...

    To count the number of cells that contain today's date...

    C2 = today's date = 7/9/2013

    Then:

    =SUMPRODUCT(--(INT(A2:A10)=C2))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    06-04-2012
    Location
    Sheffield, UK
    MS-Off Ver
    Excel 2003-2010
    Posts
    56

    Re: Countif formula for dates

    Thanks for the reply Tony, that works great however as the data will continue to grow I use a range list. In some of the cells as there isn't any data yet I use the formula =value(if(data!a1="","",data!a1)) which does what I need it to by not showing anything if there isn't anything there however that then causes your formula to come back as #NUM. is there anyway round this?

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif formula for dates

    Try this array formula**:

    =SUM(IF(ISNUMBER(A2:A10),IF(INT(A2:A10)=C2,1)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

+ 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