Returns the sum of numeric values in a field of records in a database that match conditions.
Master the fundamentals of Excel DSUM function
DSUM calculates the sum of numeric values in a specified field for database records meeting criteria. Uses separate criteria range to filter records before summing.
Requires proper database layout
Field name or numeric index
Separate range with field names
Function-specific parameters
Function-specific return type
Sum by category/period
Sum by region/product
Sum by account/department
Exact matching required
Returns numeric position
Handles missing text gracefully
=DSUM(database, field, criteria)Range of cells making up database
Field name or index to sum
Range containing conditions
Sum of matching values
Description: Sums database records meeting criteria
Total sales for North
Sums Sales for North region
Simple VBA usage
Sub UseDSum()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
ws.Range("G1").Value = Application.WorksheetFunction.DSum(ws.Range("A1:D100"), "Sales", ws.Range("E1:F2"))
End SubSum by region
No matching records
Check criteria formatSolution: Verify criteria match database values