{"id":20434,"date":"2017-03-11T16:40:18","date_gmt":"2017-03-11T16:40:18","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=20434"},"modified":"2017-03-11T16:40:18","modified_gmt":"2017-03-11T16:40:18","slug":"spreadsheets-excel-or-libreoffice-calc-sumif-continued","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/spreadsheets-excel-or-libreoffice-calc-sumif-continued\/","title":{"rendered":"Spreadsheets:  Excel or LibreOffice Calc:  sumif(), continued"},"content":{"rendered":"<h1>Tutoring spreadsheets, here&#8217;s the next level of complexity with the sumif() function:  a separate test range.<\/h1>\n<p>In my <a href=\"?p=20410\">March 9 post<\/a> I brought up sumif(), pointing out that it will selectively add values within a given range.<\/p>\n<p>sumif() offers one more level of flexibility:  you can use a different test range from the sum range.<\/p>\n<p><strong>Example:  Consider the following partial spreadsheet:<\/strong><\/p>\n<table style=\"width:auto;margin:auto\">\n<tr>\n<td style=\"text-align:center\">A<\/td>\n<td style=\"text-align:center\">B<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">110<\/td>\n<td style=\"text-align:center\">green<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">40<\/td>\n<td style=\"text-align:center\">red<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">50<\/td>\n<td style=\"text-align:center\">red<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">90<\/td>\n<td style=\"text-align:center\">green<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">70<\/td>\n<td style=\"text-align:center\">green<\/td>\n<\/tr>\n<\/table>\n<p style=\"white-space:pre-wrap\"><\/p>\n<p>Let&#8217;s imagine that, above, 110 is in the A1 position.<\/p>\n<p>The sumif() formula can be used with the following format:<\/p>\n<p style=\"font-family:monospace;font-size:120%\">=sumif(decision_range,condition,range_to_add)<\/p>\n<p>Note that, in this case, the first parameter is the range to check for agreement with the <span style=\"font-family:monospace;font-size:120%\">condition<\/span>, while the range of numbers to potentially add is the final parameter.<\/p>\n<p>Continuing with the example, let&#8217;s imagine that the formula<\/p>\n<p style=\"font-family:monospace;font-size:120%\">=sumif(b1:b5,&#8221;red&#8221;,a1:a5)<\/p>\n<p>is entered in cell c6.  It will add only the cells adjacent to the value &#8220;red&#8221;, and return the value 90.<\/p>\n<p style=\"font-family:monospace;font-size:120%\">=sumif(decision_range,condition,range_to_add)<\/p>\n<p>seems to work the same with Excel or LibreOffice Calc:)<\/p>\n<p><a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutoring spreadsheets, here&#8217;s the next level of complexity with the sumif() function: a separate test range. In my March 9 post I brought up sumif(), pointing out that it will selectively add values within a given range. sumif() offers one &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/spreadsheets-excel-or-libreoffice-calc-sumif-continued\/\"> <span class=\"screen-reader-text\">Spreadsheets:  Excel or LibreOffice Calc:  sumif(), continued<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[371,1583,1951,1065],"tags":[],"class_list":["post-20434","post","type-post","status-publish","format-standard","hentry","category-business","category-excel","category-libreoffice-calc","category-spreadsheets"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/20434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=20434"}],"version-history":[{"count":16,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/20434\/revisions"}],"predecessor-version":[{"id":20450,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/20434\/revisions\/20450"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=20434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=20434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=20434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}