DPRODUCT Function
Multiplies the values in a database column for rows that meet the criteria.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| database | The range containing the database, including the header row as the first row. | Required |
| field | The column to multiply, given as the column label in quotes (e.g. "Yield") or its 1-based column index. | Required |
| criteria | The range with a header row matching database column names and one or more condition rows; only matching records are multiplied. | Required |
Basic Example
Multiply the Yield of apple trees taller than 10
=DPRODUCT(A1:E7, "Yield", A9:B10)The criteria A9:B10 (Tree=Apple, Height>10) matches two rows with Yield 14 and 10; multiplying gives 14 x 10 = 140.
Advanced Examples
Example 1: Multiply Profit for the same trees
Switch the field to ProfitUse the same criteria but multiply the Profit column instead.
=DPRODUCT(A1:E7, "Profit", A9:B10)Example 2: Three factors from all apple trees
Criteria Tree=Apple across three rowsMultiply the Yield of all three apple rows.
=DPRODUCT(A1:E7, "Yield", A9:A10)How DPRODUCT Works
DPRODUCT filters the database to rows matching the criteria, then multiplies together the numeric values found in the specified field column of those rows. Text and blank cells in the field are ignored; if no numeric values match, the product is 0 (since the implicit starting factor is 1 only when at least one value exists, but Excel treats zero matches as 0).
Important Notes & Limitations
Considers only numeric values in the field; text and blanks are ignored.
With many values the product can quickly overflow to very large numbers.
Criteria header labels must exactly match database headers.
Common Errors & Fixes
0 resultNo rows matched, or the matching field contained no numeric values.Fix: Verify the criteria headers and conditions match the database and that the field holds numbers.
#VALUE!The field was an unquoted column name.Fix: Wrap the field name in quotes, e.g. "Yield", or use the column index.
Download Practice File
DPRODUCT
dproductPractice DPRODUCT with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the DPRODUCT function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps