Microsoft Office Tutorials and References
In Depth Information
Using DSUM to Conditionally Sum Records from a Database
Using
Using DSUM
DSUM to Conditionally Sum Records from a Database
to Conditionally Sum Records from a Database
There are three arguments to every database function. It is very easy to get
your first DSUM working. The criteriaargument is the one that offers vast
flexibility. The following section explains the syntax for DSUM. The syntax
for the other 11 database functions is identical to this.
Syntax
DSUM(database,field,criteria)
The DSUM function adds records from one field in a data set, provided that
the records meet some criteria that you specify. The DSUM function takes the
following arguments:
database
database This is the range of cells that make up the list or data-
base, including the heading row. A databaseis a list of related data in
which rows of related information are records and columns of data
are fields. In Figure 12.51 , the database is the 5,001 rows of data loc-
ated at A23:I5024.
field
field This indicates which column is used in the function. You have
three options when specifying a field:
You can point to the cell with the field name, such as H23 for Rev-
enue.
Note
To conserve space, the remaining examples in the following sections
show only the DSUM result. You can compare the various results to
the $657,028 of revenue for the current example.
You can include the word Revenue as the fieldargument.
You can use the number 8 to indicate that Revenue is the eighth field
in the database.
criteria
criteria This is the range of cells that contains the conditions
specified. You can use any range for the criteriaargument. The criter-
ia range typically includes at least one column label and at least
one cell below the column label for specifying a condition for the
column. You can also use the computed criteria discussed in Using
Search JabSto ::




Custom Search