{"id":48216,"date":"2024-03-20T23:18:30","date_gmt":"2024-03-20T22:18:30","guid":{"rendered":"https:\/\/blog.sheetgo.com\/?p=48216"},"modified":"2025-12-17T20:03:36","modified_gmt":"2025-12-17T19:03:36","slug":"cont-se-maior-que-0","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-formulas\/countif-greater-than-0\/","title":{"rendered":"Countif maior que 0 Planilhas Google"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>At its core, countif is super simple: it counts every cell that meets a condition. Countif greater than 0 is just one of the many applications of this awesome function.\u00a0<\/p>\n<p>In this article we will see just how powerful this tool is and use it to the very limits of its capabilities. Even if you\u2019ve used this function before you will surely find something new to try out.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;syntax&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Countif Syntax for Google Sheets<\/h2>\n<p>The structure for countif is as simple as it comes.<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(range, criterion)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li>Range &#8211; cells for countif to test the criterion against.<\/li>\n<li>Criterion &#8211; test to apply to the range.<\/li>\n<\/ul>\n<p>And that\u2019s it, as simple as a function can get. But as we\u2019ll explore there is more than meets the eye.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text module_id=&#8221;applications&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Different applications of countif<\/h2>\n<p>Let\u2019s go over a handful of applications of this great function. Some of them include other functions, and others even have alternative functions with the same functionality.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;greater&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Countif greater than 0<\/h3>\n<p>To count every number value over 0 all you have to do is use the greater than operator (\u201c&gt;\u201d).<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(A2:A11,&#8221;&gt;0&#8243;)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>As you can see below, this won\u2019t match exactly \u201c0\u201d or anything that isn\u2019t a number.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/03\/countif_greater_than_0_1.webp&#8221; alt=&#8221;countif greater than 0 &#8211; 1&#8243; title_text=&#8221;countif_greater_than_0_1&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;30px||30px||true|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Countif not blank<\/h3>\n<p>Here we will use the not equal to operator (\u201c&lt;&gt;\u201d) followed by nothing. This will count all cells that actually hold data. This can also be achieved with the counta function which is much simpler.<\/p>\n<p>This formula is particularly useful when trying to assess how many data points are in a spreadsheet.<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(A2:A11,&#8221;&lt;&gt;&#8221;)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>As expected this only counts 5 cells with data in the range.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/03\/countif_greater_than_0_6.webp&#8221; alt=&#8221;countif greater than 0 &#8211; 6&#8243; title_text=&#8221;countif_greater_than_0_6&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;30px||30px||true|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Countif does not equal<\/h3>\n<p>Just like in the previous example this can be achieved with the not equal to operator (\u201c&lt;&gt;\u201d). Only values other than the one specified will be counted.<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(A2:A11,&#8221;&lt;&gt;0&#8243;)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Using the same dataset in the count greater than 0 example, 8 cells were matched.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/03\/countif_greater_than_0_5.webp&#8221; alt=&#8221;countif greater than 0 &#8211; 5&#8243; title_text=&#8221;countif_greater_than_0_5&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;30px||30px||true|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Countif contains partial text<\/h3>\n<p>If you want to count cells with partial text matches, then you have to use the \u201c*\u201d wildcard. This will match any string values.<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(A2:A11,&#8221;*New*&#8221;)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In this example we matched only cells with the word \u201cnew\u201d and counted states which include it in their name.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/03\/countif_greater_than_0_4.webp&#8221; alt=&#8221;countif greater than 0 &#8211; 4&#8243; title_text=&#8221;countif_greater_than_0_4&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;30px||30px||true|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Countif month<\/h3>\n<p>This is where things start getting complex. This operation requires two new functions where the range would have been:<\/p>\n<ul>\n<li>MONTH &#8211; Extracts the month from a date and returns it as a number value. In this case we want to match 3 which is March.<\/li>\n<li>ARRAYFORMULA &#8211; Ensures that the MONTH function is applied to each cell in the range, rather than just the first cell.<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(ARRAYFORMULA(MONTH(A2:A11)), 3)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>This formula matched 3 dates in the spreadsheet. Feel free to change the month function for its year or day counterparts to match different parts of a date. Make sure to also change the range and the expected value accordingly.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/03\/countif_greater_than_0_3.webp&#8221; alt=&#8221;countif greater than 0 &#8211; 3&#8243; title_text=&#8221;countif_greater_than_0_3&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;30px||30px||true|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Google Sheets countif multiple criteria<\/h3>\n<p>Unfortunately, the only way to test against multiple criteria is to add the results from two separate countif functions. Clearly, this isn\u2019t very elegant and you are much better off using countifs. Still it is worth trying this to remember that you can add the results of different functions.<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=COUNTIF(A2:A11, &#8220;=5&#8221;) + COUNTIF(A2:A11, &#8220;=0&#8221;)<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/03\/countif_greater_than_0_2.webp&#8221; alt=&#8221;countif greater than 0 &#8211; 2&#8243; title_text=&#8221;countif_greater_than_0_2&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; custom_margin=&#8221;30px||30px||true|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;get&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Get counting!<\/h2>\n<p>Now that you know various ways to count cells based on specific criteria you can count to your heart\u2019s content. The countif formula is a great stepping stone on your spreadsheet journey.<\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Check out Sheetgo<\/a> if you want to learn how you can connect spreadsheets and automate your business processes.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At its core, countif is super simple: it counts every cell that meets a condition. Countif greater than 0 is just one of the many applications of this awesome function.\u00a0 In this article we will see just how powerful this tool is and use it to the very limits of its capabilities. Even if you\u2019ve [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":44470,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[55,39,28],"class_list":["post-48216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-ben-collins","tag-connections-t","tag-spreadsheets"],"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/48216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=48216"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/48216\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/44470"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=48216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=48216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=48216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}