Google Sheets DCOUNT function assists you to count data, which meets zero or more criterion, in a database. The D in the DCOUNT stands for database. You have to setup the criterion range with headers same
as the database headers. The headers or the field names in the database and the criterion range should have the same case.
The format of the DCOUNT function in Google Sheets is:
=DCOUNT(database, field, criteria)
For database, specify the range of the database. Example: A1:E11.
For field, specify the address of the first cell of the column that has the numbers to be counted. Example: B1.
For criteria, specify the range. It should include at least two rows.
Example: G1:K2.
Here is an example that would have a good fit to use the DCOUNT function. Assume a Google Sheets spreadsheet is a database of student names and scores in physics, chemistry, maths, and biology. Say that you want to count the students who have scored 100 in each of the four subjects.
The DCOUNT formula for the above task is:
=DCOUNT(A1:E11, B1, G1:K2)
Let's look at the criterion range for this example:
Name Physics Chemistry Maths Biology
100 100 100 100
As we want the count of students who have scored 100 in each of the four subjects, the name field is left blank. The criterion range tells that to count a student only if he or she has scored a 100 in each of the subjects.
If you want to check if a particular student has the maximum score in all the subjects, just add the name of the student beneath the Name field in the criterion range.
DCOUNT will count the data in the database range A1 to E11, based on the criterion in the criterion range G1 to K2.
Suppose say you want to find out how many students have scored 90 in maths, all you have to do is to modify the criterion as below:
Name Physics Chemistry Maths Biology
90
If you want to retain a count returned by the Google Sheets DCOUNT function and also want additional counts for new criteria, just setup the new criterion ranges.
Do take a look at this video tutorial on how to use the DCOUNT function in Google Sheets. The tutorial illustrates this function with an example.
Ещё видео!