{"id":3645,"date":"2017-04-07T16:24:46","date_gmt":"2017-04-07T14:24:46","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=3645"},"modified":"2017-04-07T16:24:46","modified_gmt":"2017-04-07T14:24:46","slug":"formule-dcount-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/google-sheets-formulas\/dcount-formula-google-sheets\/","title":{"rendered":"Comment utiliser la formule DCOUNT dans Google Sheets ?"},"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.27.2&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3094222?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">DCOUNT<\/a><span>\u00a0<\/span>formula in Google Sheets is almost similar to that of the<span>\u00a0<\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/count-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">COUNT <\/a>formula, but with a distinction. It gives us the count of numeric values available in a table like range, that meet a specified criteria. This is analogous to an SQL database count query. The \u2018D\u2019 in the DCOUNT stands for \u2018Database\u2019, therefore, we can call this a Database COUNT formula.<\/p>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Connections T &#8211; Automate between spreadsheets &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button-light vertical-banner-container&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; global_module=&#8221;50460&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/run-automatically-connect-sheet-icons.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">Automate data transfers between spreadsheets<br \/><\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.27.2&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>&nbsp;<\/p>\n<h3>Syntax<\/h3>\n<p><span><strong>DCOUNT(database, field, criteria)<\/strong><\/span><\/p>\n<ul>\n<li><span><strong>database<\/strong><\/span><span>\u00a0<\/span>\u2013 is the reference to a structured data range that consists of labels, for each column, in the first row.<\/li>\n<li><span><strong>field<\/strong><\/span><span>\u00a0<\/span>\u2013 indicates the column on which the DCOUNT formula should count the numeric values. This can be a text or a column index too.<\/li>\n<li><span><strong>criteria<\/strong><\/span><span>\u00a0<\/span>\u2013 this is a reference to a range that consists of criteria that the formula uses to filter the<span>\u00a0<\/span><span><strong>database<\/strong><\/span><span>\u00a0<\/span>values before counting.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Usage: DCOUNT Formula<\/h3>\n<p>Let us try our hands with a few examples on a sample data set picked up from this<span>\u00a0<\/span><a href=\"https:\/\/www.nutrition-and-you.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">website<\/a>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DCOUNT-formula-1.png&#8221; alt=&#8221;DCOUNT formula 1&#8243; title_text=&#8221;DCOUNT 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.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>We see that the data set is in a labeled tabular form spanning across cells A4 through to G13. And the criteria is keyed in the cells A1 through to G2.<\/p>\n<p>Please note from the cases illustrated above that we can specify one or more criteria to filter the counting process. For example, the case in row # 8 counts the numeric values in the \u201cFat (g)\u201d column, subject to the criteria in the cell F2. Whereas the case in row # 10 counts numeric values from \u201cEnergy (Kcal)\u201d column, subject to the criteria within the cells C2 and D2. The last case on row # 13 includes all the criteria from C2 through to G2, and apparently there is no data that satisfies all of these conditions, hence the result 0.<\/p>\n<p>The case on the row # 9 is an interesting one! We didn\u2019t specify anything in the cell G2, yet, we gave that reference to the DCOUNT formula. The result is 9, because it counted everything in the \u201cFiber (g)\u201d column as there is no criteria to filter out the rows.<\/p>\n<h5>Unwarranted Cases<\/h5>\n<p>Now, let us talk about pitfalls. Here is the first one, which we might already be aware of. Please consider the first case in the snapshot below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DCOUNT-formula-2.png&#8221; alt=&#8221;DCOUNT formula 2&#8243; title_text=&#8221;DCOUNT formula 2&#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.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Here, we tried counting non numeric values! Just like the COUNT formula, DCOUNT formula counts only numbers. Therefore, it returned \u20180\u2019 as output.<\/p>\n<p>The second is a not so obvious as the first one. Seemingly there\u2019s nothing wrong with the formula this time. But the problem lies within the labels. Apparently, a missing or a mismatched label doesn\u2019t help the DCOUNT formula as its working hinges on the field names that the second parameter takes. Since the labels didn\u2019t match, it returned the count as zero.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DCOUNT-formula-3.png&#8221; alt=&#8221;DCOUNT formula 3&#8243; title_text=&#8221;DCOUNT formula 3&#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.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>DCOUNT formula<\/h3>\n<p>And there you go! Use the DCOUNT formula in Google Sheets to count the numeric values available in a table like range, that meet a specified criteria.<\/p>\n<p>If you\u2019d like to learn more about the various formulas of Google Sheets, why not take a look at our blog post on the<a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/dcounta-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener\"><span> DCOUNTA formula in Google Sheets.<\/span><\/a><\/p>\n<p>Alternatively, check out related blog posts below!<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.27.2&#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.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text admin_label=&#8221;Connections B &#8211; Importrange alternative &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button vertical-banner-container&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;50475&#8243; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Add-on-sm_sheets-connected-new-connection.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">An importrange alternative, more efficient and easier to manage<\/span><\/p>\n<p><a href=\"https:\/\/workspace.google.com\/marketplace\/app\/sheetgo\/94172092257\" target=\"_blank\" rel=\"noopener\"><br \/><img decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/available-on-google-workspace-button-text.webp\" width=\"180\" height=\"\" alt=\"\" \/><br \/><\/a><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0DCOUNT\u00a0formula in Google Sheets is almost similar to that of the\u00a0COUNT formula, but with a distinction. It gives us the count of numeric values available in a table like range, that meet a specified criteria. This is analogous to an SQL database count query. The \u2018D\u2019 in the DCOUNT stands for \u2018Database\u2019, therefore, we can [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3830,"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\/3094222?hl=en\" target=\"_blank\" rel=\"noopener\">DCOUNT<\/a> formula in Google Sheets is almost similar to that of the <a href=\"https:\/\/www.sheetgo.com\/count-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener\">COUNT<\/a> formula, but with a distinction. It gives us the count of numeric values available in a table like range, that meet a specified criteria. This is analogous to an SQL database count query. The 'D' in the DCOUNT stands for 'Database', therefore, we can call this a Database COUNT formula.\n<h3>Syntax<\/h3>\n<span style=\"font-size: 14pt;\"><strong><span style=\"font-family: courier new,courier,monospace;\">DCOUNT(database, field, criteria)<\/span><\/strong><\/span>\n<ul>\n \t<li><span style=\"font-size: 12pt; font-family: courier new,courier,monospace;\"><strong>database<\/strong><\/span> - is the reference to a structured data range that consists of labels, for each column, in the first row.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>field<\/strong><\/span> - indicates the column on which the DCOUNT formula should count the numeric values. This can be a text or a column index too.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria<\/strong><\/span> - this is a reference to a range that consists of criteria that the formula uses to filter the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>database<\/strong><\/span> values before counting.<\/li>\n<\/ul>\n<h3>Usage: DCOUNT Formula<\/h3>\nLet us try our hands with a few examples on a sample data set picked up from this <a href=\"http:\/\/www.nutrition-and-you.com\/\" target=\"_blank\" rel=\"noopener\">website<\/a>.\n\n<img class=\"aligncenter size-full wp-image-3723\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-60.png\" alt=\"DCOUNT Formula - Illustration 1\" width=\"1229\" height=\"359\" \/>\n\nWe see that the data set is in a labeled tabular form spanning across cells A4 through to G13. And the criteria is keyed in the cells A1 through to G2.\n\nPlease note from the cases illustrated above that we can specify one or more criteria to filter the counting process. For example, the case in the row # 8 counts the numeric values in the \"Fat (g)\" column, subject to the criteria in the cell F2. Whereas the case in row # 10 counts numeric values from \"Energy (Kcal)\" column, subject to the criteria within the cells C2 and D2. The last case on row # 13 includes all the criteria from C2 through to G2, and apparently there is no data that satisfies all of these conditions, hence the result 0.\n\nThe case on the row # 9 is an interesting one! We didn't specify anything in the cell G2, yet, we gave that reference to the DCOUNT formula. The result is 9, because it counted everything in the \"Fiber (g)\" column as there is no criteria to filter out the rows.\n<h5>Unwarranted Cases<\/h5>\nNow, let us talk about pitfalls. Here is the first one, which we might already be aware of. Please consider the first case in the snapshot below.\n\n<img class=\"aligncenter size-full wp-image-3715\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-61.png\" alt=\"DCOUNT Formula - Illustration 2\" width=\"1229\" height=\"359\" \/>\n\nHere, we tried counting non numeric values! Just like the COUNT formula, DCOUNT formula counts only numbers. Therefore, it returned '0' as output.\n\nThe second is a not so obvious as the first one. Seemingly there's nothing wrong with the formula this time. But the problem lies within the labels. Apparently, a missing or a mismatched label doesn't help the DCOUNT formula as its working hinges on the field names that the second parameter takes. Since the labels didn't match, it returned the count as zero.\n\n<img class=\"aligncenter size-full wp-image-3716\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-62.png\" alt=\"DCOUNT Formula - Illustration 3\" width=\"1229\" height=\"361\" \/>\n\n&nbsp;","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-3645","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\/fr\/wp-json\/wp\/v2\/posts\/3645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/comments?post=3645"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/3645\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/3830"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=3645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=3645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=3645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}