+ Reply to Thread
Results 1 to 8 of 8

Count cells with a date

  1. #1
    Registered User
    Join Date
    09-23-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    9

    Count cells with a date

    I have a column where some cells have dates and others don't
    I need a formula that will add up only the cells with dates in it.

    I am using (=COUNTIF(AK3:AK274,"*")
    but that is giving me a value of zero. The column is formatted as Date.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Count cells with a date

    Hi,

    as dates are basically numbers, maybe

    =COUNT(AK3:AK274)

    Or you can write in A1 a start date and in A2 end date

    =COUNTIFS(AK3:AK274,">="&A1,AK3:AK274,"<="&A2)

    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    09-23-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    9

    Re: Count cells with a date

    Ok - is there a way to specify only certain dates?

    For example there will be dates from every month but I only want it to count dates from July?
    =countif(Ak3:ak274,"july")

    start date end date
    6/30/2014 1/1/2015
    9/14/2014 1/14/2015
    11/15/2014 2/1/2015
    blank cell 2 (needs to count only Jan dates)
    Last edited by klethag; 09-25-2015 at 11:08 AM.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Count cells with a date

    Hi,

    if you mean from first of July 2015, A1 starting date

    =COUNTIF(AK3:AK274,">="&A1)

    Or


    (adjust your date, I'm using a PC with Italian settings)


    =COUNTIF(AK3:AK274,">="&"01/07/2015")


    Not sure if it's what you need
    Last edited by canapone; 09-25-2015 at 11:16 AM.

  5. #5
    Registered User
    Join Date
    09-23-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    9

    Re: Count cells with a date

    No, I need it to count how many times July appears in the column
    In the example - for end date I need to count how many end dates happened in the month of january

    Basically it needs to add up every time the month of July appears regardless of day of the week in the column but ignore all other dates
    Last edited by klethag; 09-25-2015 at 11:19 AM.

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Count cells with a date

    Hi again,

    to count how many times July appears in AK3:AK273

    =sumproduct(--isnumber(AK3:AK273),--(month(AK3:AK273)=7))


    iF AK3:AK273 contains also strings, a more prudent formula

    =SUM(IF(ISNUMBER(AK3:AK273),IF(MONTH(AK3:AK273)=7,1,0)))

    Important: the second formula must be confirmed with control+shift+enter.
    Last edited by canapone; 09-25-2015 at 11:26 AM.

  7. #7
    Registered User
    Join Date
    09-23-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    9

    Re: Count cells with a date

    That worked!Thank you sooo much

  8. #8
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Count cells with a date

    Hi,

    thanks for your kind feedback.

    Saluti da Firenze

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] count occurrenced of today's date in cells where the date is imbedded in other text
    By ItzikM in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-25-2015, 10:51 PM
  2. Replies: 12
    Last Post: 11-22-2011, 09:27 AM
  3. count workdays between 2 date cells
    By vasto in forum Excel General
    Replies: 2
    Last Post: 09-04-2009, 11:03 AM
  4. [SOLVED] Count cells within a date range
    By Dewayne in forum Excel General
    Replies: 7
    Last Post: 08-19-2006, 11:45 PM
  5. Count cells between a date range
    By BradKopecky in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-13-2006, 04:57 PM
  6. Count number of cells with date &amp;lt;today's date
    By Cachod1 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-27-2006, 10:40 PM
  7. count the number of cells with a date <= today's date
    By Cachod1 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-27-2006, 05:20 PM

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