The DSUM function adds the numbers in a field (column) of records in a list or database that match conditions that you specify.

DSUM takes 3 required arguments and no optional arguments:

Syntax: DSUM(database, field, criteria)

A better way?
For all of Excel's database functions, you should consider if the use of pivot tables is a better alternative for your needs.

#1)
First, let's start with a simple database - our data:
#2)
Now let's talk about the field - the data we are interested in:
#3)
Now, let's specify the criteria and look at the results:
Note:
This is a simple use of the criteria argument. To see complex examples of using the criteria argument, see Advanced Criteria.
#4)
The arguments for the DSUM function are:
Argument Required? Description
database Required The range of cells that makes up the list or database. A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.
field Required This indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "WarehouseID" or "Apples," or a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
criteria Required The range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
#5)
A few more things:
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label for specifying the condition.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add more information to the list, the new information is added to the first row below the list. If the row below the list is not blank, Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.

Summary

The DSUM function adds the numbers in a field (column) of records in a list or database that match conditions that you specify.
comments powered by Disqus