{"id":3773,"date":"2017-04-07T17:02:28","date_gmt":"2017-04-07T15:02:28","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=3773"},"modified":"2017-04-07T17:02:28","modified_gmt":"2017-04-07T15:02:28","slug":"formula-mediaif-no-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-formulas\/averageif-formula-google-sheets\/","title":{"rendered":"Como usar a f\u00f3rmula AVERAGEIF no Planilhas Google"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#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.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.24.1&#8243; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3256529?hl=en\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">AVERAGEIF<\/span><\/a><span style=\"font-weight: 400;\"> formula in Google Sheets is similar to the <\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093615?hl=en\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">AVERAGE<\/span><\/a><span style=\"font-weight: 400;\"> formula, but there&#8217;s a key difference. Like the name suggests, it only includes a value in the average calculation if it meets certain criteria.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In effect, this is the AVERAGE and IF formulas combined into a convenient package. So it\u2019s a pretty useful tool that will save you time and get your spreadsheet working more efficiently.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this article we will see how this function works, we will also explore some of its basic applications. <\/span><\/p>\n<h3>Syntax of AVERAGEIF in Google Sheets<\/h3>\n<p><span><strong>AVERAGEIF(criteria_range, criterion, [average_range])<\/strong><\/span><span><\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>criteria_range<\/b><span style=\"font-weight: 400;\"> \u2013 The range of cells to check against the <\/span><b>criterion<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>criterion<\/b><span style=\"font-weight: 400;\"> \u2013 The condition specified to include values from <\/span><b>criteria_range<\/b><span style=\"font-weight: 400;\"> in the average.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>average_range<\/b><span style=\"font-weight: 400;\"> \u2013 An optional range of cells to apply the average. This is useful if you want to test a criterion in one column but want the average from another column. If we do not specify this parameter, the formula averages <\/span><b>criteria_range<\/b><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3>How to use the AVERAGEIF formula<\/h3>\n<p><span style=\"font-weight: 400;\">Below is a sample of nutritional information from a set of foods and a set of AVERAGEIF formulas applied to it.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/AVERAGEIF-formula-1.png&#8221; alt=&#8221;AVERAGEIF formula 1&#8243; title_text=&#8221;AVERAGEIF formula 1&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#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; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p><span style=\"font-weight: 400;\">The spreadsheet has sample data in A1:G10 and AVERAGEIF formulas in H1:J7. Notice that the first two formulas have text comparisons while the last four have number-based comparisons.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s break down the first formula:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Criteria_range<\/b><span style=\"font-weight: 400;\"> points to A2:A10 which has \u201cCategory\u201d information.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Criterion<\/b><span style=\"font-weight: 400;\"> evaluates if the text in these cells is \u201cVegetables\u201d<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Average_range<\/b><span style=\"font-weight: 400;\"> is C2:C10 and will calculate average \u201cEnergy\u201d.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">This AVERAGEIF formula checks foods that are in the \u201cVegetables\u201d category and finds their average energy they have.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">The formula in row 5 is a little different. The last parameter is not specified so criteria checking and value averaging are both carried out in the same cell range (D2:D10).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">AVERAGEIF returns the average of values satisfying a single criterion, if you want to find the average of values that meet multiple criteria then <\/span><b>AVERAGEIFS <\/b><span style=\"font-weight: 400;\">is what you are looking for. Learn <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/averageifs-formula-google-sheets\/\"><span style=\"font-weight: 400;\">how to use the AVERAGEIFS formula in Google Sheets<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; theme_builder_area=&#8221;post_content&#8221; hover_enabled=&#8221;0&#8243; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h4><b>Automate your work in Google Sheets<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Do you routinely apply the same formulas to datasets for analysis and reporting? Try <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/how-to-connect-google-sheets-automatically\/\"><span style=\"font-weight: 400;\">connecting Google Sheets<\/span><\/a><span style=\"font-weight: 400;\"> to move and filter data between one file and another and automate some of your data processing work.<\/span><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The AVERAGEIF formula in Google Sheets is similar to the AVERAGE formula, but there&#8217;s a key difference. Like the name suggests, it only includes a value in the average calculation if it meets certain criteria. In effect, this is the AVERAGE and IF formulas combined into a convenient package. So it\u2019s a pretty useful tool [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"The <a href=\"https:\/\/support.google.com\/docs\/answer\/3256529?hl=en\">AVERAGEIF<\/a> formula in Google Sheets is similar to that of the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093615?hl=en\">AVERAGE<\/a> formula, but with a difference. Like the name suggests, it gives us the average of values subject to a specified criteria.\n<h3>Syntax<\/h3>\n<span style=\"font-family: courier new,courier,monospace; font-size: 14pt;\"><strong>AVERAGEIF(criteria_range, criterion, [average_range])<\/strong><\/span>\n<ul>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria_range<\/strong><\/span> - this is the address reference to a range of cells against which the formula checks for the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criterion<\/strong><\/span>.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criterion<\/strong><\/span> - is the condition or test that is used to qualify the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria_range<\/strong><\/span> cells for averaging. There are six types of comparisons in general, as listed below. While we can compare both numbers and text using the first two operators, we can only compare numbers using the last four operators.\n<ul>\n \t<li>Equals (=)<\/li>\n \t<li>Not equal to (<>)<\/li>\n \t<li>Greater than (>)<\/li>\n \t<li>Greater than or equal to (>=)<\/li>\n \t<li>Less than (<)<\/li>\n \t<li>Less than or equal to (<=)<\/li>\n<\/ul>\n<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>average_range<\/strong><\/span> - is an optional address reference to the range of cells that the AVERAGEIF formula considers for averaging. If we do not specify this parameter, the formula averages <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria_range<\/strong><\/span>.<\/li>\n<\/ul>\n<h3>Usage: AVERAGEIF Formula<\/h3>\nBelow is a sample nutritional information from a select set of foods. Let us try a few examples to establish our understanding of the formula further.\n\n<img class=\"aligncenter size-full wp-image-3801\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-53.png\" alt=\"AVERAGEIF Formula - Illustration 1\" width=\"1223\" height=\"292\" \/>\n\nWe have the sample data populated on the cells A1 through to G10. Please notice the first two cases are text comparisons while the last four cases are number based comparisons.\n\nPlease consider the first case. The first parameter is the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria_range<\/strong><\/span>, which is A2:A10. The <span style=\"font-size: 12pt; font-family: courier new,courier,monospace;\"><strong>criterion<\/strong><\/span> is \"Vegetables\". And the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>average_range<\/strong><\/span> is C2:C10. So, the AVERAGEIF formula checks for instances of \"Vegetables\" within the range A2:A10, then averages the values from the range C2:C10 that are in the rows where it finds \"Vegetables\".\n\nNow, let us spend a moment on the case in row # 5. You'll see that we did not specify the last parameter. In this case the formula is doing both criteria checking and value averaging on the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria_range<\/strong><\/span> itself i.e. D2:D10.\n\n\u00a0","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-3773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/3773","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\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=3773"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/3773\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=3773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=3773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=3773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}