{"id":1105,"date":"2018-07-01T11:07:44","date_gmt":"2018-07-01T11:07:44","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=1105"},"modified":"2023-11-02T20:23:12","modified_gmt":"2023-11-02T20:23:12","slug":"countif","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/functions\/countif\/","title":{"rendered":"COUNTIF function"},"content":{"rendered":"\n

The COUNTIF function in Excel is a useful tool for counting the number of cells in a range that meets a specific condition. It allows you to quickly tally up data points that match a particular criterion, making it a valuable function for data analysis and reporting.<\/p>\n\n\n\n

Syntax<\/h2>\n\n\n\n

=COUNTIF(range, [criteria])<\/strong><\/p>\n\n\n\n

Arguments<\/h2>\n\n\n\n
range<\/strong><\/td>The range of cells you want to count values in.<\/td><\/tr>
[criteria]<\/strong><\/td>(Optional) The condition you want to apply for counting. It can be a specific value, expression, or text enclosed in double quotes.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

How to Use<\/h2>\n\n\n\n

The COUNTIF function is straightforward to use. Here are some examples to illustrate its application:<\/p>\n\n\n\n

Example 1:<\/strong> Count the number of “Apples” in a list of fruits:<\/p>\n\n\n\n

=COUNTIF(A1:A10, \"Apples\")<\/code><\/pre>\n\n\n\n

This formula counts the number of cells in the range A1 to A10 that contain the text “Apples.”<\/p>\n\n\n\n

Example 2:<\/strong> Count the values greater than 50 in a range:<\/p>\n\n\n\n

=COUNTIF(B1:B10, \">50\")<\/code><\/pre>\n\n\n\n

This formula counts the cells in the range B1 to B10 that have values greater than 50. The “>” symbol is used to indicate the condition.<\/p>\n\n\n\n

Example 3:<\/strong> Count cells with a specific text pattern using wildcards:<\/p>\n\n\n\n

=COUNTIF(C1:C10, \"A*p\")<\/code><\/pre>\n\n\n\n

This formula counts cells in the range C1 to C10 that start with “A” and end with any character, such as “Apple” or “App.” The asterisk (*) acts as a wildcard for matching any number of characters.<\/p>\n\n\n\n

Example 4:<\/strong> Count cells with a specific condition using cell references:<\/p>\n\n\n\n

=COUNTIF(D1:D10, \">=\"&E1)<\/code><\/pre>\n\n\n\n

In this formula, the COUNTIF function counts cells in the range D1 to D10 that meet a condition defined in cell E1. This allows you to change the condition easily by altering the value in E1.<\/p>\n\n\n\n

With the COUNTIF function, you can perform various counting tasks efficiently and customize them to your specific needs. It’s a versatile tool that simplifies data analysis in Excel.<\/p>\n","protected":false},"excerpt":{"rendered":"

The COUNTIF function in Excel is a useful tool for counting the number of cells in a range that meets a specific condition….<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[180],"yoast_head":"\nCOUNTIF function<\/title>\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\/functions\/countif\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"COUNTIF function\" \/>\n<meta property=\"og:description\" content=\"The COUNTIF function in Excel is a useful tool for counting the number of cells in a range that meets a specific condition....\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/functions\/countif\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-01T11:07:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-02T20:23:12+00:00\" \/>\n<meta name=\"author\" content=\"Tomasz Decker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Decker\" \/>\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\/functions\/countif\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/functions\/countif\/\"},\"author\":{\"name\":\"Tomasz Decker\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"headline\":\"COUNTIF function\",\"datePublished\":\"2018-07-01T11:07:44+00:00\",\"dateModified\":\"2023-11-02T20:23:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/functions\/countif\/\"},\"wordCount\":290,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"keywords\":[\"done\"],\"articleSection\":[\"functions\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/functions\/countif\/\",\"url\":\"https:\/\/officetuts.net\/excel\/functions\/countif\/\",\"name\":\"COUNTIF function\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"datePublished\":\"2018-07-01T11:07:44+00:00\",\"dateModified\":\"2023-11-02T20:23:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/functions\/countif\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/functions\/countif\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/functions\/countif\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"COUNTIF function\"}]},{\"@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.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"COUNTIF function","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\/functions\/countif\/","og_locale":"en_US","og_type":"article","og_title":"COUNTIF function","og_description":"The COUNTIF function in Excel is a useful tool for counting the number of cells in a range that meets a specific condition....","og_url":"https:\/\/officetuts.net\/excel\/functions\/countif\/","article_published_time":"2018-07-01T11:07:44+00:00","article_modified_time":"2023-11-02T20:23:12+00:00","author":"Tomasz Decker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tomasz Decker","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/functions\/countif\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/functions\/countif\/"},"author":{"name":"Tomasz Decker","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"headline":"COUNTIF function","datePublished":"2018-07-01T11:07:44+00:00","dateModified":"2023-11-02T20:23:12+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/functions\/countif\/"},"wordCount":290,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"keywords":["done"],"articleSection":["functions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/functions\/countif\/","url":"https:\/\/officetuts.net\/excel\/functions\/countif\/","name":"COUNTIF function","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"datePublished":"2018-07-01T11:07:44+00:00","dateModified":"2023-11-02T20:23:12+00:00","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/functions\/countif\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/functions\/countif\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/functions\/countif\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"COUNTIF function"}]},{"@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."}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/1105"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=1105"}],"version-history":[{"count":5,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/1105\/revisions"}],"predecessor-version":[{"id":16420,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/1105\/revisions\/16420"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=1105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=1105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=1105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}