Go Back

Learn How to Use the Excel DMAX Function

The purpose of Excel DMAX function is used to return the maximum values within a field range, derived from a set of records that match those criteria. In opposite to this, the DMIN function is used in order to get the minimum value.  Moreover, DMAX function is to return the maximum value in a matching record. The returning value is the maximum value in a given field range.

How to use the Excel DMAX function

Figure 1: DMAX Function Layout

The syntax of the function

The main syntax for the DMAX function in Excel is:

=DMAX (database, field, criteria)

The main arguments and attributes of the DMAX function are as following:

  • Database– Database range that includes headers
  • Field – Field name to be counted
  • Criteria – Criteria range the includes headers

Use of the Excel DMAX Function

The DMAX function in Excel is as stated above, used in order to find out the maximum value in a given field of sets of records that may match the criteria. The first part database is the range of cells the also include the headers, the next part field is the name of the field from which the mac value is derived from, and criteria are the range that matches those in the database.

To get the maximum value from the field of price in the above example, the color has been selected as “blue” and the quantity is >2, it can be shown with these formulas:

= DMAX (B8:E15, “Price” , B5:E6) // field by name

=DMAX  (B8:E15,2, B5:E6) // field by index

Criteria options

There are some wildcards that can be used as available criteria options within this function, and a table is there to show what possible available criteria can be used instead:

Still need some help with Excel formatting or have other questions about Excel? Connect with a live Excel expert here for some 1 on 1 help. Your first session is always free. 

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

Hi, I'm stuck on DMAX formula where we have asked to calculate Highest cost to members in area code 905, but at place of Area code, they had given me phone like 905-632-1111, how i can get that result?
Solved by G. J. in 29 mins
In B23:B26, add database functions that find the DAVERAGE (B23), DSUM (B24), DMAX (B25), and DMIN (B26) for the CallDataAll named range. Use named ranges in the formulas. Select the cell range B22:B26, and then copy the formulas to column C.
Solved by G. C. in 11 mins

Leave a Comment