Excel DSUM Function
Categorized as a Database Function, the DSUM function calculates the sum of numbers from a database that match the given criteria.
Syntax
=DSUM (database, field, criteria)
Arguments
- Database (required): Database range with headers included.
- Field (required): Column name, index number, or cell reference to count.
- Criteria (required): Criteria range with headers included.
Return value
Numeric value.
The DSUM function returns the sum of values matching certain conditions in a database.
Function notes
- The DSUM function, like all other database functions, is not case-sensitive.
- The field argument can be a column header by its name in quotation marks, the number that indicates the position of a specific column in the database, and the cell reference of a column header.
- The criteria argument can be any range of cells. But it must include at least one column label and at least one cell below the column label to specify the condition. Multi-row criteria are also accepted.
- A variety of expressions such as wildcards can be applied in the criteria argument. Here are some examples.
- The purpose of the criteria argument is to filter the database and specify which records should be calculated.
- The column headers in the criteria range must be included in the database range.
- In theory, the criteria range can be located anywhere on the worksheet . But it is recommended not to be placed under the data list, in case more data need to be added.
Examples
In this case, we need to calculate the sum of all sales in the database that match the criteria. See the screenshot:
To do so, please copy the formula below into cell F7 and press the Enter key to get the result.
=DSUM (B3:D11, 3, F3:H4)
Notes:
- In the above formula, we use the number that indicates the position of the sales column in the database range as the field argument, which is 3 since the sales column is at the 3rd position.
- We can change the value in the field argument to the column header name enclosed in quotation marks. In this case, the input value becomes “sales” in the field argument. And the formula becomes:
=DSUM (B3:D11, "sales" , F3:H4)
- The field argument can also be entered as a cell reference, which is D3 in this case. So the formula changes to:
=DSUM (B3:D11, D3 , F3:H4)
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Supports Office/Excel 2007-2021 and 365 | Available in 44 Languages | Easy to Uninstall Completely

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
