Cómo utilizar la fórmula DCOUNT en Google Sheets

En DCOUNT la fórmula en Google Sheets es casi similar a la CONTAR 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.

 

39

Automatice las transferencias de datos entre hojas de cálculo

Descubra cómo

 

Sintaxis

DCOUNT(database, field, criteria)

  • base de datos - es la referencia a un rango de datos estructurado que consiste en etiquetas, para cada columna, en la primera fila.
  • campo – indicates the column on which the DCOUNT formula should count the numeric values. This can be a text or a column index too.
  • criterios - esta es una referencia a un rango que consiste en criterios que la fórmula utiliza para filtrar los base de datos antes del recuento.

 

Usage: DCOUNT Formula

Let us try our hands with a few examples on a sample data set picked up from this sitio web.

DCOUNT formula 1

Vemos que el conjunto de datos está en forma de tabla etiquetada que abarca desde la celda A4 hasta la G13. Y los criterios están codificados en las celdas A1 a G2.

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 “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.

The 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.

Casos injustificados

Hablemos ahora de los escollos. He aquí el primero, que quizá ya conozcamos. Consideremos el primer caso de la siguiente imagen.

DCOUNT formula 2

Here, we tried counting non numeric values! Just like the COUNT formula, DCOUNT formula counts only numbers. Therefore, it returned ‘0’ as output.

The 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.

DCOUNT formula 3

DCOUNT formula

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.

Si desea obtener más información sobre las distintas fórmulas de las Hojas de cálculo de Google, eche un vistazo a nuestra entrada del blog sobre las fórmulas de Google. DCOUNTA formula in Google Sheets.

También puede consultar las entradas del blog relacionadas a continuación.

39

Una alternativa importante, más eficaz y fácil de gestionar



También te puede gustar...

funciones y fórmulas de google sheets

Cómo hallar el tipo de interés nominal con Google Sheets

Sarah es una joven profesional que toma importantes decisiones financieras. Desde tarjetas de crédito a hipotecas, préstamos estudiantiles e inversiones...
funciones y fórmulas de google sheets

Extraer datos de Google Calendar en Google Sheets mediante Apps Script

Este post fue publicado originalmente en nuestro foro de la comunidad. Objetivo : Esta guía muestra cómo utilizar Google Apps Script para extraer datos...
funciones y fórmulas de google sheets

Uso de la función PROPER para escribir en mayúsculas la primera letra de cada palabra en Google Sheets

Nota: Este artículo se publicó originalmente en el foro de nuestra comunidad. Alguna vez te has visto en la necesidad de limpiar una lista de nombres, títulos o cualquier...