Returns the largest number in the specified column of the specified database that matches the specified criteria.
Syntax
![]() |
---|
DMAX( Database database, TextOrNumber field, Reference criteria ) → Number |
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell underneath the column label for specifying the condition.
The following table shows a small database for a grocery shop. Each record in the table contains information about one item. Above the database are several cells that contain the conditions used as the function criteria.
NAME | CATEGORY | PRICE | PRICE | |
| Beverages | >10 | <15 |
|
| Confections |
|
|
|
Name | Category | Weight | Qty | Price |
Blueberry Tea | Beverages | 400 | 12 | 12.50 |
Ipoh Cofee | Beverages | 500 | 20 | 18.00 |
Chocolade | Confections | 1250 | 10 | 22.45 |
Steeleye Stout | Beverages | 750 | 6 | 7.95 |
Scottish Longbreads | Confections | 450 | 8 | 11.50 |
Mascarpone | Dairy | 250 | 2 | 7.50 |
The following formula will return the largest price of beverages in the table:
Formula
![]() |
---|
=DMAX(A4:E10,"Price",B1:B2) |
Function Reference
DGET Function
DAVERAGE Function
DCOUNT Function
DCOUNTA Function
DMIN Function
DPRODUCT Function
DSTDEV Function
DSTDEVP Function
DSUM Function
DVAR Function
DVARP Function