Microsoft KB Archive/26441

{| = Excel: Using DCOUNT to Count Occurrences of Text in a Database =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q26441

SUMMARY
In Microsoft Excel, the DCOUNT function normally counts the occurrence of numbers in a particular field of a database for all records that satisfy a set of criteria. It is also possible to count the occurrence of text in a field.

Text in a database field can be counted by omitting the &quot;field&quot; argument. For example, to count numbers in the field titled &quot;Amount&quot; according to a specific criteria, the DCOUNT function should appear as follows:

=DCOUNT(Database,&quot;Amount&quot;,Criteria) However, to count records that match the criteria, even if the fields in those records do not contain numbers, the function should be written as follows: =DCOUNT(Database,,Criteria)
 * }