{"id":3718,"date":"2017-04-07T16:30:02","date_gmt":"2017-04-07T14:30:02","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=3718"},"modified":"2017-04-07T16:30:02","modified_gmt":"2017-04-07T14:30:02","slug":"dcounta-formula-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/es\/blog\/google-sheets-formulas\/dcounta-formula-google-sheets\/","title":{"rendered":"C\u00f3mo utilizar la f\u00f3rmula DCOUNTA en 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 _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 _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<p>The<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3094147?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">DCOUNTA<\/a><span>\u00a0<\/span>formula in Google Sheets\u00a0counts the number of values in a table-like array or range that meet specific criteria. It is similar to an SQL database count query. The \u2018D\u2019 in DCOUNTA stands for \u2018Database\u2019, therefore this is a <strong>Database COUNTA<\/strong> formula. Whereas the <a href=\"https:\/\/support.google.com\/docs\/answer\/3094222\" target=\"_blank\" rel=\"noopener noreferrer\">DCOUNT<\/a> function only counts numeric values, DCOUNTA counts both numeric and text values.<\/p>\n<h3><\/h3>\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_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; min_height=&#8221;393px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Syntax<\/h3>\n<p><span><strong>DCOUNTA(database, field, criteria)<\/strong><\/span><\/p>\n<ul>\n<li><span><strong>database<\/strong><\/span><span>\u00a0<\/span>\u2013 the array or range containing the data you want the formula to operate on. The first row must contain the labels for for each column and you cannot use merged cells.<\/li>\n<li><span><strong>field<\/strong><\/span><span>\u00a0<\/span>\u2013 the column containing the values you want the DCOUNTA formula to count. This can be a text label or a numeric index when the first column is 1.<\/li>\n<li><span><strong>criteria<\/strong><\/span><span>\u00a0<\/span>\u2013 an array or range containing the criterion\/criteria that the formula uses to <strong>filter the\u00a0<\/strong><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>How to use DCOUNTA Formula<\/h3>\n<p>Let&#8217;s take a look at a few examples. To illustrate the formula in use, I&#8217;ve used sample data from a<span>\u00a0<\/span><a href=\"https:\/\/www.nutrition-and-you.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">nutrition website<\/a>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DCOUNTA-formula-1.png&#8221; alt=&#8221;DCOUNTA formula 1&#8243; title_text=&#8221;DCOUNTA 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>You can see that the data set is in a labeled tabular format spanning cells A4 through to G13. And the criteria are entered in cells A1 to G2. This is my <strong>key<\/strong>.<\/p>\n<p>Looking at the cases illustrated above, you&#8217;ll notice that it&#8217;s possible to specify<strong> one or more<\/strong> criteria to filter the counting process. For example, the case in row 7 counts the values in the \u201cProtein (g)\u201d column, subject to the criteria in cell E2. The case in row 9 counts the values from the \u201cEnergy (Kcal)\u201d column, subject to the criteria in cells C2 and D2. The last case in row 10 includes all the criteria from A2 through to G2, and apparently there are two rows that satisfy all of these conditions, hence the result 2.<\/p>\n<p>The case in row 8 is an interesting one! I didn\u2019t specify anything in cell G2, but gave that reference to the DCOUNTA formula. The result is 9. Why? Because the formula counts everything in the \u201cFiber (g)\u201d column as there is no criterion\/criteria to filter out the rows.<\/p>\n<h5>Avoiding DCOUNTA problems<\/h5>\n<p>One thing to keep in mind is correct labeling. Take a look at the screenshot below:<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DCOUNTA-formula-2.png&#8221; alt=&#8221;DCOUNTA formula 2&#8243; title_text=&#8221;DCOUNTA 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><span>There\u2019s nothing wrong with the formula but the result is incorrect. The problem lies with the labels. A missing or mismatched label prevents DCOUNTA formula from working. In the above example, the labels for the two parameters didn\u2019t match so the formula returned a count of zero.<\/span><\/p>\n<h3><span>Using Google Sheets like a database<\/span><\/h3>\n<p>DCOUNTA is one of several <a href=\"https:\/\/support.google.com\/docs\/answer\/173497\" target=\"_blank\" rel=\"noopener noreferrer\">Database functions<\/a> in Google Sheets. If you organize your data in the correct tabular format, you can use these formulas to deliver results from a specific range of cells, a bit like a table in a database.<\/p>\n<p>If you want to use Google Sheets like a relational database, it&#8217;s possible to go a step further and <a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/how-to-connect-google-sheets-automatically\/\" target=\"_blank\" rel=\"noopener noreferrer\">connect separate Google Sheets files<\/a>. This enables you to push and pull data between them, and combine data in an automated workflow. Check out our guides on how to <a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/combine-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">combine multiple Google Sheets\u00a0<\/a>to learn more.<\/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 T &#8211; Automate beyond importrange &#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; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;50462&#8243; theme_builder_area=&#8221;post_content&#8221;]<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;\">Automate data transfers beyond Importrange<\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0DCOUNTA\u00a0formula in Google Sheets\u00a0counts the number of values in a table-like array or range that meet specific criteria. It is similar to an SQL database count query. The \u2018D\u2019 in DCOUNTA stands for \u2018Database\u2019, therefore this is a Database COUNTA formula. Whereas the DCOUNT function only counts numeric values, DCOUNTA counts both numeric and text [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3833,"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\/3094147?hl=en\" target=\"_blank\" rel=\"noopener\">DCOUNTA<\/a> formula in Google Sheets is almost similar to that of the <a href=\"https:\/\/www.sheetgo.com\/counta-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener\">COUNTA<\/a> formula, but with a distinction. It gives us the count of 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 DCOUNTA stands for 'Database', therefore, we can call this a Database COUNTA formula.\n<h3>Syntax<\/h3>\n<span style=\"font-size: 14pt;\"><strong><span style=\"font-family: courier new,courier,monospace;\">DCOUNTA(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 DCOUNTA 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: DCOUNTA 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-3732\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-57.png\" alt=\"DCOUNTA Formula - Illustration 1\" width=\"1230\" 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 # 7 counts the values in the \"Protein (g)\" column, subject to the criteria in the cell E2. Whereas the case in row # 9 counts the values from \"Energy (Kcal)\" column, subject to the criteria within the cells C2 and D2. The last case on row # 10 includes all the criteria from A2 through to G2, and apparently there are two rows that satisfies all of these conditions, hence the result 2.\n\nThe case on the row # 8 is an interesting one! We didn't specify anything in the cell G2, yet, we gave that reference to the DCOUNTA formula. The result is 9, as it counted everything in the \"Fiber (g)\" column as there is no criteria to filter out the rows.\n<h5>Unwarranted Case<\/h5>\nNow, let us talk about a pitfall. Please consider the following snapshot.\n\n<img class=\"aligncenter size-full wp-image-3735\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-58.png\" alt=\"DCOUNTA Formula - Illustration 2\" width=\"1230\" height=\"363\" \/>\n\nSeemingly there's nothing wrong with the formula but the result isn't what we are expecting. The problem lies within the labels. Apparently, missing or a mismatched label doesn't help the DCOUNTA formula apparently 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&nbsp;","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-3718","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\/es\/wp-json\/wp\/v2\/posts\/3718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/comments?post=3718"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/3718\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media\/3833"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media?parent=3718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/categories?post=3718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/tags?post=3718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}