Excel DSUM Function
This Excel Tutorial demonstrates how to use the Excel DSUM Function in Excel to sum records in a database, with formula examples.
DSUM Function Description:
The DSUM Function Calculates the sum of a field in a database for records that meet certain criteria.
Syntax and Arguments:
The Syntax for the DSUM Formula is:
Function Arguments ( Inputs ):
database – The database range with field names in the top row.
field – The field within the database to sum. This can either be the field name (ex: “birth date”) or column number (ex: 5).
criteria – The range of cells containing the criteria that indicates which records to sum. Example:
Use the DSUM Function to add database records that meet certain criteria.
First, indicate the array that contains the database. IMPORTANT: The first row of the database must contain field names.
Next, indicate which field within the database to sum. Either enter the field name, enclosed by quotations (ex: “Age”) or enter a number corresponding with the field’s position within the database (ex: 2 for second column).
Last, reference the range of cells that contains the criteria to use. The Criteria must have at least one field name with a condition below it. You can enter more fields in separate columns to add more conditions.
DSUM Examples in VBA
You can also use the DSUM function in VBA. Type:
For the function arguments (database, etc.), you can either enter them directly into the function, or define variables to use instead.
Return to the List of all Functions in Excel
How to use the DSUM Function in Excel:
To use the AND Excel Worksheet Function, type the following into a cell:
After entering it in the cell, notice how the AND formula inputs appear below the cell:
You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=DSUM(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:
For more information about the DSUM Formula visit the