Excel function

DPRODUCTfunction

Multiplies the field values of records that meet the criteria.

All versions
=DPRODUCT(A1:D9, 3, F1:F2)
Range to drag
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9

Drag the corner dots to change database, criteria. Click the numbers on the top to change field. Set field to 3 (Qty) and widen the criteria range to F1:F3. Try breaking it on purpose to see the errors.

Result

9600

database
A1:D9Drag the corner dots on the table

The whole list. The first row must hold the headers (field names).

field
3database has 4 columns

The column to calculate. The first column of the database is 1. In Excel you can also write a header name such as "Sales" or a cell like D1.

criteria
F1:F2

The criteria table. Its first row holds headers; conditions on the same row must all hold (AND), conditions on different rows are alternatives (OR).

What is the DPRODUCT function?

=DPRODUCT(database, field, criteria)

DPRODUCT picks only the records in a list (database) that meet a criteria table and multiplies the numbers in the field (column) you choose. Its conditions are written as a separate table on the sheet.

Change the criteria range and the field to watch each record checked and multiplied.

DPRODUCT is the least used of the database functions, but it fits when the values to combine are multipliers, such as growth factors or yield rates for the records that meet a condition. Like the other database functions, the criteria live in a table on the sheet, so editing the table switches which records are multiplied.

Arguments

database
The whole list. The first row must hold the headers.
field
The column to calculate: a column number (the first column is 1), a header name such as "Sales", or a cell holding the header (D1).
criteria
The criteria table. Its first row uses the same headers as the database, with the conditions below.

DPRODUCT examples

  1. Example 1. Basic use

    =DPRODUCT(A1:D9, 3, F1:F2)

    Multiplies the Seoul quantities 30, 8 and 40: 9600.

  2. Example 2. AND condition

    =DPRODUCT(A1:D9, 3, F1:G2)

    Seoul records with sales of 40000 or more have quantities 30 and 40: 1200.

  3. Example 3. Results for each criteria range

    =DPRODUCT(A1:D9, "Qty", criteria)

    The same formula with only the criteria range changed.

    Criteria rangeQuantities multipliedResult
    F1:F230, 8, 409,600
    F1:G230, 401,200
    F5:F64040

Common mistakes

FAQ

What if no record matches?
The result is 0.
Text fields?
Values that are not numbers are skipped, not multiplied.