The DPRODUCT Excel function is a powerful tool that enables users to perform multiplication operations on a set of values contained in a database that meet specified criteria. By utilizing DPRODUCT, users can easily analyze data and derive meaningful insights through calculations directly relating to the filtered dataset.
Syntax
DPRODUCT(database, field, criteria)
- database: The range of cells that comprise the database, including headers.
- field: The column or field from which the function will retrieve values, represented either by the field’s name enclosed in quotes or its index number.
- criteria: The range of cells defining the conditions that must be met for inclusion in the calculation.
Example #1
=DPRODUCT(A1:C10, "Sales", E1:E2)
This function multiplies the values in the “Sales” field of the records in the range A1:C10 that satisfy the criteria defined in E1:E2. For instance, if the values in the specified “Sales” field are 100, 150, and 200 with matching criteria, the result might be 30000 (100 150 200).
Example #2
=DPRODUCT(A1:B5, 2, D1:D2)
In this example, the function retrieves and multiplies values from the second column of the range A1:B5, where the records fulfill the conditions in D1:D2. If the product of those values equals 600, the result will be 600.
Example #3
=DPRODUCT(A1:C10, "Income", F1:F2)
This call computes the product of numbers in the “Income” field within A1:C10 that meet criteria in F1:F2. For instance, if the relevant “Income” values are 300 and 400, the output could be 120000 (300 400).
Error handling
- DIV/0!: This error occurs when the function attempts to multiply by zero, leading to an undefined product.
- NAME?: This message indicates that Excel does not recognize the field name or database range specified in the function.
- NUM!: This error shows up when criteria evaluate to an empty dataset; hence, multiplication cannot be performed.