{"id":7947,"date":"2018-02-16T11:32:35","date_gmt":"2018-02-16T10:32:35","guid":{"rendered":"https:\/\/www.myexcelonline.com\/blog\/?p=7595"},"modified":"2023-11-30T18:11:08","modified_gmt":"2023-11-30T17:11:08","slug":"countif-formula-excel-2","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/countif-formula-excel-2\/","title":{"rendered":"CountIf Formula in Excel"},"content":{"rendered":"<p><em><strong>What does it do?<\/strong><\/em><\/p>\n<p>Counts the number of cells that matches your specified condition<\/p>\n<p><em><strong>Formula breakdown:<\/strong><\/em><\/p>\n<p>=COUNTIF(<span style=\"color: #0000ff;\">range<\/span>, <span style=\"color: #ff6600;\">criteria<\/span>)<\/p>\n<p><em><strong>What it means:<\/strong><\/em><\/p>\n<p>=COUNTIF(<span style=\"color: #0000ff;\">range of cells to check<\/span>, <span style=\"color: #ff6600;\">condition to check against<\/span>)<\/p>\n<hr \/>\n<p>Do you have a scenario where you want to count the number of cells that <strong>match a specific condition?<\/strong><\/p>\n<p>I&#8217;m sure you do!\u00a0 There is a simple way to count this with Excel&#8217;s\u00a0<strong>COUNTIF formula!<\/strong><\/p>\n<p>The <strong>COUNTIF formula<\/strong> is very flexible indeed, so let us try to count the following from our Excel worksheet:<\/p>\n<ul>\n<li>Number of cells <strong>greater than 2<\/strong><\/li>\n<li>Number of cells that have a <strong>Yellow<\/strong> value<\/li>\n<li>Number of cells that <strong>start with the letter J<\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-01.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7608\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-01.jpg\" alt=\"CountIf Formula in Excel\" width=\"693\" height=\"137\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-01.jpg 693w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-01-300x59.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\"><\/a><\/p>\n<p>I explain how you can do this below:<\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/f1Kei7Msrug?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA.xlsx\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA.xlsx\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">COUNTIF-FORMULA.xlsx<\/span><\/a><\/p>\n<p class=\"line-two\">\n<\/div>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1:<\/strong><\/span> We need to <strong>enter the <i>COUNTIF\u00a0<\/i>function in a blank cell<\/strong>:<\/p>\n<h2 style=\"text-align: center;\"><span style=\"color: #0000ff;\">=COUNTIF(<\/span><\/h2>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-02.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7609\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-02.jpg\" alt=\"CountIf Formula in Excel\" width=\"297\" height=\"142\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2:<\/strong><\/span>\u00a0The <b>COUNTIF\u00a0<\/b>arguments:<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_57_1 counter-flat ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li><a href=\"#\" class=\"scroll-to-download\">Free Practice Workbook<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/countif-formula-excel-2\/#range\" title=\"range\">range<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/countif-formula-excel-2\/#criteria\" title=\"criteria\">criteria<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"range\"><\/span><span style=\"color: #0000ff;\"><em><strong>range<\/strong><\/em><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>What is the range of values that you want to check against your condition?<\/strong><\/p>\n<h2 style=\"text-align: center;\">=COUNTIF(<span style=\"color: #0000ff;\">A9:A12,<\/span><\/h2>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-03.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7610\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-03.jpg\" alt=\"CountIf Formula in Excel\" width=\"355\" height=\"153\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-03.jpg 355w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-03-300x129.jpg 300w\" sizes=\"(max-width: 355px) 100vw, 355px\"><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"criteria\"><\/span><span style=\"color: #0000ff;\"><em><strong>criteria<\/strong><\/em><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>What is the condition that you want to check against?<\/strong><\/p>\n<p>For our 1st example, we want to count the number of values greater than 2.<\/p>\n<h2 style=\"text-align: center;\">=COUNTIF(A9:A12,<span style=\"color: #0000ff;\"> &#8220;&gt;2&#8221;)<\/span><\/h2>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-04.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7611\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-04.jpg\" alt=\"CountIf Formula in Excel\" width=\"341\" height=\"158\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-04.jpg 341w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-04-300x139.jpg 300w\" sizes=\"(max-width: 341px) 100vw, 341px\"><\/a><\/p>\n<p>You now have your count of numbers greater than 2!<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-05.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7612\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-05.jpg\" alt=\"CountIf Formula in Excel\" width=\"343\" height=\"151\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-05.jpg 343w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-05-300x132.jpg 300w\" sizes=\"(max-width: 343px) 100vw, 343px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 3:<\/strong><\/span>\u00a0Now let us try for counting the number of\u00a0<strong>Yellow\u00a0<\/strong>values:<\/p>\n<h2 style=\"text-align: center;\"><span style=\"color: #0000ff;\">=COUNTIF(C9:C12, &#8220;Yellow&#8221;)<\/span><\/h2>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-06.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7613\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-06.jpg\" alt=\"CountIf Formula in Excel\" width=\"397\" height=\"150\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-06.jpg 397w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-06-300x113.jpg 300w\" sizes=\"(max-width: 397px) 100vw, 397px\"><\/a><\/p>\n<p>You now have your count of values that have the Yellow text!<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-07.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7614\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-07.jpg\" alt=\"CountIf Formula in Excel\" width=\"391\" height=\"151\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-07.jpg 391w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-07-300x116.jpg 300w\" sizes=\"(max-width: 391px) 100vw, 391px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 4:<\/strong><\/span>\u00a0Now let us try for counting the number of names<strong> starting with the Letter J<\/strong>:<\/p>\n<p>Let us use the wildcard expression <strong>J*<\/strong><\/p>\n<p><strong>*<\/strong> signifies a <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/sumifs-function-wildcards\/\" target=\"_blank\" rel=\"noopener noreferrer\">wildcard character<\/a> i.e. Return any value that <strong>begins with a J<\/strong><\/p>\n<h2 style=\"text-align: center;\"><span style=\"color: #0000ff;\">=COUNTIF(E9:E12, &#8220;J*&#8221;)<\/span><\/h2>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-08.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7615\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-08.jpg\" alt=\"CountIf Formula\" width=\"453\" height=\"159\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-08.jpg 453w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-08-300x105.jpg 300w\" sizes=\"(max-width: 453px) 100vw, 453px\"><\/a><\/p>\n<p>You now have your count of values that have a starting letter of J!<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-09.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\" class=\"alignnone size-full wp-image-7616\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-09.jpg\" alt=\"CountIf Formula in Excel\" width=\"457\" height=\"151\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-09.jpg 457w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/01\/COUNTIF-FORMULA-09-300x99.jpg 300w\" sizes=\"(max-width: 457px) 100vw, 457px\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff;\"><strong>CountIf Formula in Excel<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What does it do? Counts the number of cells that matches your specified condition Formula breakdown: =COUNTIF(range, criteria) What it means: =COUNTIF(range of cells to check, condition to check against) Do you have a scenario where you want to count the number of cells that match a specific condition? I&#8217;m sure you do!\u00a0 There is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":17796,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[325,3,15],"tags":[329,142],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/7947"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=7947"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/7947\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17796"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=7947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=7947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=7947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}