{"id":8128,"date":"2021-10-05T11:34:34","date_gmt":"2021-10-05T11:34:34","guid":{"rendered":"https:\/\/officetuts.net\/excel\/?p=8128"},"modified":"2024-03-29T14:24:55","modified_gmt":"2024-03-29T14:24:55","slug":"use-countif-with-dates","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/","title":{"rendered":"How to Use Countif with Dates in Excel"},"content":{"rendered":"\n
Use-Countif-with-Dates<\/a>Download File<\/a><\/div>\n\n\n\n

COUNTIF<\/strong> is a very useful Excel function that counts the number of times cells that have some common parameter appear in a range.<\/p>\n\n\n\n

It has two parameters:<\/p>\n\n\n\n

    \n
  1. The range in which cells are found and;<\/li>\n\n\n\n
  2. Criteria based on which we want to count the cells.<\/li>\n<\/ol>\n\n\n\n

    In the text below, we are going to show how to use this function when we have dates in our range.<\/p>\n\n\n\n

    Countif with Dates<\/h2>\n\n\n\n

    For our example, we will use a filled questionnaire from a person that is traveling abroad (to Spain):<\/p>\n\n\n\n

    \"A<\/figure>\n\n\n\n

    Now, if we want to know how many cells we have that contain a date, we will use the following formula:<\/p>\n\n\n\n

    =COUNTIF(B1:B8,\">=1\/1\/1900\")<\/code><\/pre>\n\n\n\n

    Our count will be as follows:<\/p>\n\n\n\n

    \"Graphical<\/figure>\n\n\n\n

    Which is the correct result of the dates we have in our range.<\/p>\n\n\n\n

    To simply explain how this formula works, we need to understand that Excel observes all dates as numbers. Number 1<\/strong> indicates the date 1\/1\/1900<\/strong>. This date is the oldest date that we can have. So with this formula, we cover all the dates bigger than this one, which is every possible date.<\/p>\n\n\n\n

    There is, sadly, a downside to this formula. In all cells in column B<\/strong>, we only have the dates as numbers, since the passport number has the letter \u201cB\u201d<\/strong> in it. If we delete the letter \u201cB\u201d<\/strong>, we will get the following result of our COUNTIF formula<\/strong>:<\/p>\n\n\n\n

    \"Graphical<\/figure>\n\n\n\n

    Now we have the number 4<\/strong>, which means Excel recognized four values that are bigger than number 1<\/strong> in our range.<\/p>\n\n\n\n

    Sadly, there is no workaround for this issue. So this can serve as a good warning<\/strong>. If you have a combination of numbers and dates, Excel will always observe them as equal, as dates are simply numbers in a different format.<\/p>\n\n\n\n

    Countif in a Combination with Isnumber<\/h2>\n\n\n\n

    We can also use a COUNTIF formula<\/strong> in a combination with the ISNUMBER function<\/strong> to count the number of dates in our range.<\/p>\n\n\n\n

    For this purpose, we will create another sheet with traveling info data:<\/p>\n\n\n\n

    \"Table\n\nDescription<\/figure>\n\n\n\n

    We have the passport number with the letter \u201eB\u201c<\/strong> which means that this will not be included in our formula.<\/p>\n\n\n\n

    ISNUMBER<\/strong> is a simple Excel formula that checks if a value in our desired cell refers to a number or not. If it is a number, then it returns the value TRUE<\/strong>. If not, it returns FALSE.<\/strong><\/p>\n\n\n\n

    The formula in cell B1<\/strong> will be:<\/p>\n\n\n\n

    =ISNUMBER(B1)<\/code><\/pre>\n\n\n\n

    We will drag this formula till the end of our table (cell B8<\/strong>) and will have the following results:<\/p>\n\n\n\n

    \"Table\n\nDescription<\/figure>\n\n\n\n

    Now we will count only those values that are true, and the formula in cell B9<\/strong> will be:<\/p>\n\n\n\n

    =COUNTIF(C1:C8, \"TRUE\")<\/code><\/pre>\n\n\n\n

    The result will be number 3<\/strong>, as we could have guessed:<\/p>\n\n\n\n

    \"Graphical<\/figure>\n","protected":false},"excerpt":{"rendered":"

    COUNTIF is a very useful Excel function that counts the number of times cells that have some common parameter appear in a range….<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[170,190],"yoast_head":"\nHow to Use Countif with Dates in Excel<\/title>\n<meta name=\"description\" content=\"Learn how to use COUNTIF with dates in Excel. Download the example file and discover how to count the number of cells with a date.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Countif with Dates in Excel\" \/>\n<meta property=\"og:description\" content=\"Learn how to use COUNTIF with dates in Excel. Download the example file and discover how to count the number of cells with a date.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-05T11:34:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-29T14:24:55+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png\" \/>\n<meta name=\"author\" content=\"Harun Spahic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Harun Spahic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\"},\"author\":{\"name\":\"Harun Spahic\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2\"},\"headline\":\"How to Use Countif with Dates in Excel\",\"datePublished\":\"2021-10-05T11:34:34+00:00\",\"dateModified\":\"2024-03-29T14:24:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\"},\"wordCount\":447,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png\",\"keywords\":[\"file\",\"pinterest\"],\"articleSection\":[\"formulas\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\",\"url\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\",\"name\":\"How to Use Countif with Dates in Excel\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png\",\"datePublished\":\"2021-10-05T11:34:34+00:00\",\"dateModified\":\"2024-03-29T14:24:55+00:00\",\"description\":\"Learn how to use COUNTIF with dates in Excel. Download the example file and discover how to count the number of cells with a date.\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage\",\"url\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png\",\"contentUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Countif with Dates in Excel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/officetuts.net\/excel\/#website\",\"url\":\"https:\/\/officetuts.net\/excel\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/officetuts.net\/excel\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\",\"name\":\"Tomasz Decker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"caption\":\"Tomasz Decker\"},\"logo\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\"},\"description\":\"Spreadsheet and Python enthusiast.\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2\",\"name\":\"Harun Spahic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g\",\"caption\":\"Harun Spahic\"},\"sameAs\":[\"http:\/\/human.bsru.ac.th\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Countif with Dates in Excel","description":"Learn how to use COUNTIF with dates in Excel. Download the example file and discover how to count the number of cells with a date.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Countif with Dates in Excel","og_description":"Learn how to use COUNTIF with dates in Excel. Download the example file and discover how to count the number of cells with a date.","og_url":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/","article_published_time":"2021-10-05T11:34:34+00:00","article_modified_time":"2024-03-29T14:24:55+00:00","og_image":[{"url":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png"}],"author":"Harun Spahic","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Harun Spahic","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/"},"author":{"name":"Harun Spahic","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2"},"headline":"How to Use Countif with Dates in Excel","datePublished":"2021-10-05T11:34:34+00:00","dateModified":"2024-03-29T14:24:55+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/"},"wordCount":447,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage"},"thumbnailUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png","keywords":["file","pinterest"],"articleSection":["formulas"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/","url":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/","name":"How to Use Countif with Dates in Excel","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage"},"thumbnailUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png","datePublished":"2021-10-05T11:34:34+00:00","dateModified":"2024-03-29T14:24:55+00:00","description":"Learn how to use COUNTIF with dates in Excel. Download the example file and discover how to count the number of cells with a date.","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#primaryimage","url":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png","contentUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2021\/10\/a-picture-containing-diagram-description-automati.png"},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/formulas\/use-countif-with-dates\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"How to Use Countif with Dates in Excel"}]},{"@type":"WebSite","@id":"https:\/\/officetuts.net\/excel\/#website","url":"https:\/\/officetuts.net\/excel\/","name":"","description":"","publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/officetuts.net\/excel\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42","name":"Tomasz Decker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","caption":"Tomasz Decker"},"logo":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/"},"description":"Spreadsheet and Python enthusiast."},{"@type":"Person","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2","name":"Harun Spahic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g","caption":"Harun Spahic"},"sameAs":["http:\/\/human.bsru.ac.th\/"]}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/8128"}],"collection":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=8128"}],"version-history":[{"count":4,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/8128\/revisions"}],"predecessor-version":[{"id":13691,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/8128\/revisions\/13691"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=8128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=8128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=8128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}