You can use the DMAX function in Excel to find the max value in a column that meet one or more specific conditions.
This function uses the following basic syntax:
DMAX(database, field, criteria)
where:
- database: The range of cells that make up the “database” of interest
- field: The column to find max value in
- criteria: The range of cells that contain the conditions to meet
The following examples show how to use the DMAX function in practice with the following dataset in Excel that contains information about various basketball players:
Example 1: Use DMAX with One Condition
Suppose we would like to find the max value in the “Points” column where the value in the “Team” column is Mavs.
We can type our criteria into the range A2:D3 and then use the following formula with the DMAX function in cell G2:
=DMAX(A5:D16, "Points", A2:D3)
The following screenshot shows how to use this formula in practice:
The formula returns a value of 32.
This tells us that the max value in the “Points” column where the corresponding value in the “Team” column is Mavs is 32.
Example 2: Use DMAX with Multiple Conditions
Suppose we would like to find the max value in the the “Rebounds” column where the following conditions are met:
- Value in “Team” column is Mavs
- Value in “Points” column is greater than 20
We can type our criteria into the range A2:D3 and then use the following formula with the DMAX function in cell G2:
=DMAX(A5:D16, "Rebounds", A2:D3)
The following screenshot shows how to use this formula in practice:
The formula returns a value of 13.
This tells us that the max value in the “Rebounds” column among players on the Mavs team with a points value greater than 20 is 13.
Additional Resources
The following tutorials explain how to perform other common tasks in Excel:
Excel: How to Use VLOOKUP to Return Max Value
Excel: How to Highlight Max Value in Each Row
Excel: How to Find Max Value by Group