DMAX()

SyntaxDMAX(database,field,criteria)

Definition. This function returns the largest number from a column in a list or database that matches the specified conditions.

Arguments

Background. Use the DMIN() and DMAX() functions to find the smallest or largest value in a database based on certain criteria. DMAX() returns a value from a database, such as the highest production volume for a product within the past five years.

Example. As a wholesaler, you have many customers to whom you sell a range of the products you offer. You want to analyze your customers, sales, and products. First you want to know the product and customer with the highest sales based on orders within the United States. For this you can use the DMAX() function.

The DMAX function looks for the largest sales value for orders from the United States (see Figure 13-15). Because you want to know only the highest sales within the United States, you specify USA as a search criterion (B5). You don’t specify the product because you want to include all products in the search.

DMAX() returns the greatest value from a list based on certain criteria.

Figure 13-15. DMAX() returns the greatest value from a list based on certain criteria.

DMAX() returns 2000; that is, the highest order placed in the United States was for $2,000.

If you also want to know which company placed this order and what product the company bought, you can perform additional calculations with the DGET() function. Figure 13-16 shows a possible solution.

The DGET() function is used for additional calculations.

Figure 13-16. The DGET() function is used for additional calculations.

With the DMAX() function, you can quickly analyze your sales and customers.

See Also

DMIN(), MAX(), MIN()