+ Reply to Thread
Results 1 to 4 of 4

Countif for cells with dates

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Countif for cells with dates

    Is there a way to use countif to count any cells that have a date value in them?

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Countif for cells with dates

    A date value equates to a number unless its in text format and will always be a whole number, the year of which will be greater than or equal to 1900

    Try this array formula

    =SUMPRODUCT(--(IFERROR(YEAR(A1:A15),0)>=1900),--(A1:A15<>""))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Last edited by Ace_XL; 09-30-2013 at 01:21 PM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Countif for cells with dates

    If you are asking if you can count the # of cells that have a date in them (such as a specific date) rather than simply counting any cell that has any date in it, yes to the former. I would say to the latter it might depend on the formatting and content.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Countif for cells with dates

    Try

    =COUNTIF(A1:A100,">0")


    Technically, this is counting numeric values (dates are just numbers)
    Don't think you can explicitly test for a date, just if it's a number or text..

+ 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. COUNTIF function with Dates & due dates.
    By kcowper in forum Excel General
    Replies: 3
    Last Post: 03-10-2011, 12:51 AM
  2. countif non blank cells + dates overdue
    By mcmillad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2006, 08:50 AM
  3. Countif using dates
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 44
    Last Post: 09-06-2005, 05:05 AM
  4. Countif using dates
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  5. Countif using dates
    By Bugaglugs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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