Table of Contents
Use DSUM to total one numeric column for records that match a criteria range. The criteria are visible on the worksheet, so you can change the conditions without editing the formula.
DSUM syntax
=DSUM(database, field, criteria). Include the source headers in database. For field, use the exact header in quotes, a reference to its header cell, or its position within the database range. For criteria, include the matching header cells and the condition rows below them. Some regional settings use semicolons in place of commas.

Example 1: Sum totals for products that start with iPhone
For data in A6:E13 and the amount header in E6, copy the product header to C2, enter iPhone* in C3, and use =DSUM(A6:E13,E6,C2:C3). The asterisk matches any number of characters after iPhone. Using the header cell avoids guessing the exact spelling of the amount column.




Example 2: Sum totals where the quantity is at least five
Replace C2 with the exact sales-quantity header from the database and enter >=5 in C3. The same DSUM formula now totals the amount for rows meeting the quantity condition.



Combine criteria with AND or OR
| Product | Sales Quantity |
|---|---|
| iPhone* | >=5 |
| iPad* | >=10 |
Use the actual headers from your data. Conditions on the same row must both match. Different rows are alternatives. This example includes iPhone rows with quantities of at least five or iPad rows with quantities of at least ten. Omit unintended blank rows from the criteria range because a blank condition row can match everything.
If the result is unexpected, check headers, numeric cells stored as text, and whether the database range includes every record. See Microsoft’s DSUM examples and related Excel functions.
Reader Comments 0
Sign in with email or Google to join the discussion.