+ Reply to Thread
Results 1 to 7 of 7

Count number of dates present in a column

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Count number of dates present in a column

    Hi, I'm looking to be able to total the number of dates present in a column. Some of the cells will be empty and other will have a date in them. Do I use COUNTIF or SUMPRODUCT?
    Thanks in advance

    Sean

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Count number of dates present in a column

    You can use sumproduct, this example will count cells between two dates, you can adjsut the start date and end date.
    =SUMPRODUCT(--(A2:A1000>=DATE(2012,1,1)),--(A2:A1000<=DATE(2012,12,31)))

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Count number of dates present in a column

    countif will work, just use =countif(A1:A100,">0")
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Registered User
    Join Date
    03-04-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    48

    Re: Count number of dates present in a column

    If I understand correctly - you want a total of the number of cells that an entry in them - the code below will count any cell that has a value greater than 0.

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Count number of dates present in a column

    hello
    @ daves formula we can adjust this to : betwenn 2000 - 2050

    =SUMPRODUCT(N(YEAR(A1:A100)>=2000),N(YEAR(A1:A100)<=2050))

    NOTE: dates are also numbers if you use countif it will include the numbers on the count..

    exam.

    5
    6
    11/12/2011
    5

    =countif() will return 4
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Registered User
    Join Date
    03-05-2012
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Count number of dates present in a column

    Thank everyone for your quick response. Much appreciated. I used Dgagnons version in the end. Sean

  7. #7
    Registered User
    Join Date
    03-04-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    48

    Re: Count number of dates present in a column

    **Misread prev post
    Last edited by jstn; 03-05-2012 at 09:00 PM. Reason: *removed

+ 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