{"id":1838,"date":"2015-11-03T00:20:33","date_gmt":"2015-11-02T23:20:33","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=1838"},"modified":"2023-11-30T21:50:20","modified_gmt":"2023-11-30T20:50:20","slug":"excel-subtotal-function-avoid-double-counting","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/excel-subtotal-function-avoid-double-counting\/","title":{"rendered":"Excel Subtotal Function &#8211; Avoid Double Counting"},"content":{"rendered":"<p><span style=\"color: #000000;\"><em><strong>What does it do?<\/strong><\/em><\/span><\/p>\n<p>It returns a Subtotal in a list or database<\/p>\n<p><span style=\"color: #000000;\"><em><strong>Formula breakdown:<\/strong><\/em><\/span><\/p>\n<p>=SUBTOTAL(<span style=\"color: #0000ff;\">function_num<\/span>, <span style=\"color: #ff6600;\">ref1<\/span>)<\/p>\n<p><span style=\"color: #000000;\"><em><strong>What it means:<\/strong><\/em><\/span><\/p>\n<p>=SUBTOTAL(<span style=\"color: #0000ff;\">function number 1-11 includes manually-hidden rows &amp; 101-111 excludes them<\/span>, <span style=\"color: #ff6600;\">your list or range of data<\/span>)<\/p>\n<p>***<em>Go to the bottom of this post to see what each value stands for<\/em><\/p>\n<hr \/>\n<p>The <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/math\/subtotal\/\" target=\"_blank\" rel=\"noopener\">SUBTOTAL function in Excel<\/a> has many great features, like the ability to:<\/p>\n<p><strong>*<\/strong> Return a <strong>SUM, AVERAGE, COUNT, COUNTA, MAX or MIN<\/strong> from your data;<\/p>\n<p><strong>* Include hidden values<\/strong> within your data by entering the first argument <em>function_num<\/em>, as values between 1-11;<\/p>\n<p><strong>* Ignore\u00a0hidden values<\/strong> within your data by entering the first argument <em>function_num<\/em>, as values between 101-111;<\/p>\n<p><strong>*<\/strong> Find the SUBTOTAL of <strong>filtered values<\/strong>;<\/p>\n<p><strong>*<\/strong> Ignore other SUBTOTALS that are included in your range, <strong>avoiding any double counting!<\/strong><\/p>\n<h2><\/h2>\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\/excel-subtotal-function-avoid-double-counting\/#AVOIDING_DOUBLE_COUNTING_WITH_THE_SUBTOTAL_FUNCTION%E2%80%A6\" title=\"AVOIDING DOUBLE COUNTING WITH THE SUBTOTAL FUNCTION&#8230;\">AVOIDING DOUBLE COUNTING WITH THE SUBTOTAL FUNCTION&#8230;<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"AVOIDING_DOUBLE_COUNTING_WITH_THE_SUBTOTAL_FUNCTION%E2%80%A6\"><\/span><span style=\"color: #ff0000;\"><strong>AVOIDING DOUBLE COUNTING WITH THE SUBTOTAL FUNCTION&#8230;<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is probably the most useful feature within the SUBTOTAL function!<\/p>\n<p>Let&#8217;s say\u00a0you have various SUBTOTALS within your data, one SUBTOTAL to <em>Sum<\/em> the North Region and another SUBTOTAL to <em>Sum<\/em> the South Region.<\/p>\n<p>You can include a third SUBTOTAL for your Grand Total which references all of your data and ignoring\u00a0the North &amp; South Region SUBTOTALS,\u00a0meaning that there is <strong>no double counting<\/strong> in your Grand Total.<\/p>\n<p>See the below images of how this works with the SUBTOTAL function and how it double counts when using the SUM function:<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Excel Subtotal Function - Avoid Double Counting\"  class=\"alignnone size-full wp-image-1848\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub1.png\" alt=\"Excel Subtotal Function - Avoid Double Counting\" width=\"564\" height=\"361\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub1.png 564w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub1-300x192.png 300w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/a><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub2.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Excel Subtotal Function - Avoid Double Counting\"  class=\"alignnone size-full wp-image-1849\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub2.png\" alt=\"Excel Subtotal Function - Avoid Double Counting\" width=\"588\" height=\"364\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub2.png 588w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/sub2-300x186.png 300w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/a><br \/>\n<iframe src=\"https:\/\/www.youtube.com\/embed\/C7s3p7aDDb4?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><\/p>\n<p><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><span style=\"text-decoration: underline; color: #0000ff;\"><a class=\"IRPP_minimalist icon-download\" style=\"color: #0000ff; text-decoration: underline;\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/Subtotal-Avoid-Double-Counting.xlsx\" target=\"_blank\"><span class=\"ctaText px-3 text-capitalize\">Download workbook<\/span><span class=\"postTitle px-3\">Subtotal-Avoid-Double-Counting.xlsx<\/span><\/a><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>***Values for\u00a0the SUBTOTAL <em>function_num<\/em>:<\/strong><script src=\"\/bundles\/modernizr?v=fkiOQOTN6clcm597YUur3XOCoxGf0GUw-9KnkKYzK8U1?b=16063272150\"><\/script><script src=\"https:\/\/ots.optimize.webtrends.com\/ots\/lib\/3.2\/wt_lib.js\" async=\"true\" defer=\"defer\" type=\"text\/javascript\"><\/script><script src=\"https:\/\/ots.optimize.webtrends.com\/ots\/ots\/js-3.2\/314949\/WT3PZUdfkGZ7DRRgIcyL5lyl0CG3h0RhTGUQvXpRwSkWidgA0VdcpU1jYu8kkUihSe5dQJQVhUvxdt9b0AEYZKXd8WAo0gwBnyRKcSEIlcYrRWnBafI7-D5cB9yr-OSCSRHvpXZ3JA6zuWrIo2Ly-ZkzEavtsg1xQkWCUau4e7f6NqP_XkosD-Xo6FrP4dk8NB8MP6GsnWuN3LGIcutUPJcBhQkVlGmh1G9szY_ggAVkPumzKy8I0TWstqmDQD8Rf1poA02Y2Jslohl1dbRISrlHCHpSNzN4nvATqM1Q7vfEy_WGzluiDCZuNxZFGu0RhiA7vqx2GBElRvdR9uz0D1yN857IcZ3PZJTECmKm-dcUzvxXXH6aOmV6jVUhUki_NECoi89rlOA9rIPG54vM5-AbfAOHbJPm-vKZYpJF6U1j5xzseqvoBAnGjTrsRkLUcpRDc5Xb5N7-WybloGKBl7aXMwOOXBbJOTmYL2qqgX1g-hE6lLTPRGcctUx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3yhWfmPEYe5glNAGh5SXZ-ejRFn3JEtzeMcpysBimFEKwidowlA80IZi3sUcUMk_R6_yPb1jAokOta_EYfWKaaTRy4KyehVyPTSei_EubVrTIprq-xtNmkFmEYoCCu2g31I0PoLxvGXSrbMUDJGhAsqXUWWF59v-8ooGVPQ3jFUt9wDlWqL2wMr6oYgty51jbbyg35UJMml4R9rE3d5dItYYh7Ck_N0zpcuZw6lzB4gL3cNy_xVL0x-zcyEcRhGjrBbmmQLi0Tss3ZcDI6Uv_cSDMNRPFvuepFaAtzM5g6FmpCcR1b26sB7umDOYG4hvwSmkOzWG8l1vZ-Zp3kyO8aozVzPvcm8IVCJKGmoZfbFuqwSdY9XistlfS0lVk5aimINGqL\/1446497457336-334\/0\/3\" async=\"true\" defer=\"defer\" type=\"text\/javascript\"><\/script><script src=\"https:\/\/ots.optimize.webtrends.com\/ots\/ots\/js-3.2\/314949\/sgdjTI6EZVkpLdg6OSJfowAvd2kjuleGwOvH6Mhk1AF6foBsgvkHZYRgy0nfLKkNtyX8G5c12GtAAvQJYOTAYSbISzS8LIW3HCNOC40VNDu6gKr1-pTxYyEl5gabni1SHRsN7KVISOMqdfbs8w6rFS1OcInTM-L5XGoh9it6v7isZrEfeuZwQB5utJkf0kHu9zT0Dc3UUWMwKqxFwVtgJ2-uTOuZQCfXvbCs59_jFxE-Bo1bEyYimsfK6k4Z76dPM7r5C-VsGrdYTmSmvtyg39zOBsUU1kIIab5BAc1XoXB8H9p9FKnus0qZPl1qWUjI7LVx_t1wY4ps4fSWTvSbDNTnDIaMhDDyrncl2F2xLgB3w08SOhPAFbmADFvTqLFCFTIUao9JxsBT57CBxsZyy1aoqHhPUgUP_t6ULDxzGtQfs58e5euAlVMMBoQlAFeO_prYgAgwszXF1KY08lb7TV8koECzMaxs_J0doXyhgewAm1Vl2H60dsFqQ_KctBmdd_CGzSa8x0O6oYK0ZiFz71xm2Z0qsxv6vJJ4cOrhyTQbOhPS1XbagrzqaCcRUE8nc7MaD8Icdim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jSuj4JYdEHtIN4mzYkb3BWT8iiBo8knj3y5slhk6h2RVDpHCn2KM0KCHv2zOyBZ7vNrJ8NRWLJjJEGHq2BYNFYDD1wLvHaEHnHvF7YC06iDm-z4xeBpxXmFO5Zlak0xLaqyxl3t2cZvhbn-7FpqL6j0X2ehkQqzL52JlqaY_UamVax2eHOGLYbMQ0mexqTw9ifUM2fkCRZO7_e1bjiqZjqDw1KUukL_lV6hz6Argmov91dN4JwXYsEfYg3bqF_sZJVCrjmzgvRNBJAQUq9wDV9Pp2Srv2vcA7Aarx8QxTezhKsYLnClpzvaRdnwztvoq\/1446497457336-334\/1\/3\" async=\"true\" defer=\"defer\" type=\"text\/javascript\"><\/script><script src=\"https:\/\/ots.optimize.webtrends.com\/ots\/ots\/js-3.2\/314949\/eiW231uwAa8XbiiMxtBn3cRey3-nko7e3CCK-VbSGfIh-YOVptwDYktKt30HzeJpMfAGR\/1446497457336-334\/2\/3\" async=\"true\" defer=\"defer\" type=\"text\/javascript\"><\/script><\/p>\n<section id=\"ocHelp\">\n<div id=\"ocClient\">\n<div id=\"ocMainContent\" class=\"grd main-content zero-margin\">\n<div class=\"row\">\n<div class=\"col-5-5\">\n<article id=\"ocpArticleContent\" class=\"ocpArticleContent\">\n<section class=\"ocpSection\">\n<table id=\"tblID0EBBDAAA\" class=\"banded\">\n<thead>\n<tr>\n<td><strong><span style=\"color: #0000ff;\">Includes <\/span><span style=\"color: #0000ff;\">hidden values \u00a0 \u00a0<\/span><\/strong><\/td>\n<td><strong><span style=\"color: #0000ff;\">Ignores <\/span><span style=\"color: #0000ff;\">hidden values \u00a0 \u00a0<\/span><\/strong><\/td>\n<td><span style=\"color: #0000ff;\"><strong>Function \u00a0<\/strong> \u00a0 \u00a0<\/span><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>101<\/td>\n<td>AVERAGE<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>102<\/td>\n<td>COUNT<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>103<\/td>\n<td>COUNTA<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>104<\/td>\n<td>MAX<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>105<\/td>\n<td>MIN<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>106<\/td>\n<td>PRODUCT<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>107<\/td>\n<td>STDEV<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>108<\/td>\n<td>STDEVP<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>109<\/td>\n<td>SUM<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>110<\/td>\n<td>VAR<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>111<\/td>\n<td>VARP<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/section>\n<\/article>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What does it do? It returns a Subtotal in a list or database Formula breakdown: =SUBTOTAL(function_num, ref1) What it means: =SUBTOTAL(function number 1-11 includes manually-hidden rows &amp; 101-111 excludes them, your list or range of data) ***Go to the bottom of this post to see what each value stands for The SUBTOTAL function in Excel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17221,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"Excel Subtotal Function - Avoid Double Counting","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[3,15,290],"tags":[43,112,111],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/1838"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=1838"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/1838\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17221"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=1838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=1838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}