+ Reply to Thread
Results 1 to 5 of 5

counting cells containing date values

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    Wales
    MS-Off Ver
    office 2007/excel 2003
    Posts
    15

    Wink counting cells containing date values

    Ok so I have a sheet whereby column A holds dates throughout the year.

    What I need to do is, on sheet 2 is to have a formula which will count all cells in column A containing dates from 1/1/2009 to 31/1/2009, Another column will count all dates from 1/2/2009 to 28/2/2009 and so on. I have tried the countif format but this does not seem to work. If you should have any ideas great.

    many thanks.
    Last edited by langdon37; 09-13-2009 at 12:10 PM. Reason: solved

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: counting cells containing date values

    Hi,

    You could put a start date in one cell and the end date in another and use something like

    =SUMPRODUCT(--(A1:A24<=C2),--(A1:A24>=C1)) where C1 hold start and C2 hold end date

    or

    =SUMPRODUCT(--($A$1:$A$24>=C1),--($A$1:$A$24<=EOMONTH(C1,0))) where C1 holds start date and use EOMONTH for the end date of the month
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: counting cells containing date values

    =COUNTIF(A1:A10, ">=1/1/09") - COUNTIF(A1:A10, ">1/31/09"), adjusted for the funny way you guys write dates ...
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: counting cells containing date values

    For Excel 2007:
    =COUNTIFS(A1:A24,">=1/5/2009",A1:A24,"<1/7/2009")

  5. #5
    Registered User
    Join Date
    11-03-2008
    Location
    Wales
    MS-Off Ver
    office 2007/excel 2003
    Posts
    15

    Re: counting cells containing date values

    Thanks shg, worked a treat.

+ 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