{"id":1533,"date":"2021-07-04T12:21:25","date_gmt":"2021-07-04T04:21:25","guid":{"rendered":"https:\/\/www.fyndpro.com\/?p=1533"},"modified":"2026-08-27T22:22:57","modified_gmt":"2026-08-27T14:22:57","slug":"excel-solve-case-sensitive","status":"publish","type":"post","link":"https:\/\/www.fyndpro.com\/en\/excel-solve-case-sensitive\/","title":{"rendered":"Solving the Case-Sensitivity Issue with COUNTIF in Excel"},"content":{"rendered":"<p>Many people are familiar with using the COUNTIF function to count the number of occurrences that meet a specific condition. However, COUNTIF has a limitation: it cannot distinguish between uppercase and lowercase letters. When faced with certain scenarios, it may yield incorrect results. So, how can we modify the formula to obtain the correct answer?<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2924\" src=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=1024%2C430&#038;ssl=1\" alt=\"\" width=\"1024\" height=\"430\" srcset=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=1024%2C430&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=150%2C63&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=768%2C323&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=1536%2C646&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=2048%2C861&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-1.png?resize=18%2C8&amp;ssl=1 18w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h4>Can COUNTIF Handle This?<\/h4>\n<p>The answer is no. COUNTIF cannot differentiate between uppercase and lowercase letters. For COUNTIF, \"Abc,\" \"ABC,\" and \"aBc\" are all considered the same. Therefore, if you apply COUNTIF to the ranges D2, D3, and D4, the result will be 6.<\/p>\n<h4>What Formula Can Replace COUNTIF?<\/h4>\n<p>The solution is to use the following formula:<\/p>\n<div>\n<div>\n<div data-collapsed=\"unknown\"><em>=SUMPRODUCT(EXACT(C2,$A$2:$A$7)*1)<\/em><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2925\" src=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=1024%2C431&#038;ssl=1\" alt=\"\" width=\"1024\" height=\"431\" srcset=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=1024%2C431&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=150%2C63&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=768%2C323&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=1536%2C646&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=2048%2C861&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2021\/07\/A0008-2.png?resize=18%2C8&amp;ssl=1 18w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/div>\n<\/div>\n<\/div>\n<h4>Formula Breakdown:<\/h4>\n<ul>\n<li><strong>EXACT Function<\/strong>: This function can distinguish between uppercase and lowercase letters. For example,\u00a0<code>=\"ABC\"=\"Abc\"<\/code>\u00a0will return FALSE.<\/li>\n<li><strong>EXACT(C2,$A$2:$A$7)<\/strong>: This part instructs Excel to verify each cell in the range A2:A7 against C2, resulting in an array of TRUE and FALSE values, such as\u00a0<code>{TRUE;FALSE;FALSE;TRUE;TRUE;FALSE}<\/code>.<\/li>\n<li>*<em>EXACT(C2,$A$2:$A$7)1<\/em>: By multiplying the array of TRUE and FALSE values by 1, we convert it to numerical values, resulting in\u00a0<code>{1;0;0;1;1;0}<\/code>.<\/li>\n<li><strong>SUMPRODUCT(EXACT(C2,$A$2:$A$7)*1)<\/strong>: Finally, this sums up the resulting array, giving the count of how many times \"Abc\" appears in the range A2:A7, which would be 3 in this case.<\/li>\n<\/ul>\n<h4>Conclusion<\/h4>\n<p>By using the combination of the EXACT function and SUMPRODUCT, you can effectively count case-sensitive occurrences in Excel, overcoming the limitations of the COUNTIF function.<\/p>\n<p><em>A0008<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>\u8a31\u591a\u4eba\u719f\u6089\u4f7f\u7528 COUNTIF \u51fd\u6578\u4f86\u8a08\u7b97\u7b26\u5408\u7279\u5b9a\u689d\u4ef6\u7684\u51fa\u73fe\u6b21\u6578\u3002\u7136\u800c COUNTIF \u6709\u500b\u9650\u5236\uff1a\u7121\u6cd5\u5340\u5206\u5927\u5c0f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3793,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[20,8],"tags":[125,180,295,126],"class_list":["post-1533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-onlinesupport","category-excel","tag-countif","tag-exact","tag-excel-formulas","tag-sumproduct"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2026\/08\/new_covers_batch_03_1785_excel.jpg?fit=816%2C1088&ssl=1","_links":{"self":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts\/1533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/comments?post=1533"}],"version-history":[{"count":9,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts\/1533\/revisions"}],"predecessor-version":[{"id":3898,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts\/1533\/revisions\/3898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/media\/3793"}],"wp:attachment":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/media?parent=1533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/categories?post=1533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/tags?post=1533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}