DPRODUCT function in Excel

What is DPRODUCT function in Excel?


The DPRODUCT function is one of the Database functions of Excel.

It multiplies the values in the field (column) records in the database that match the specified conditions.

We can find this function in Database of insert function Tab.

How to use DPRODUCT function in excel

  1. Click on an empty cell (like F5 )
Click on an empty cell

2. Click on the fx icon (or press shift+F3)

 Click on the fx icon (or press shift+F3)

3. In the insert function tab you will see all functions

insert function tab

4. Select Database category

5. Select DPRODUCT function

6. Then select ok

7. In the function arguments Tab you will see DPRODUCT function

8. In the Database section you can enter the range of cells that makes up the list or database. A database is a list of related data (ex: Table1)

9. Field section is either the label of the column in double quotation marks or a number that represents the column’s position in the list

10. Criteria section is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition (ex: Table1)

11. You will see the result in formula result section

How to use DPRODUCT function in excel

Examples of DPRODUCT function in excel

Python code for DPRODUCT function

NameAgeHeightWeight
Olivia25210180
Noah25205235
Oliver27195205
Elijah22198185
James29199231
William29201240
Benjamin21202235
Lucas25200238
Henry22204190
import math

import pandas as pd

data=pd.read_csv(‘nba.csv’)

df = pd.DataFrame(data)

condition=df.loc[lambda df: (df[‘Age’] >27 )*(df[‘Height’]>198)] product_Weight=math.prod(condition[‘Weight’])

print(product_Weight

DPRODUCT related functions :

Leave a Reply

Your email address will not be published. Required fields are marked *