Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
All articles LOOKUP How to use the Max if Criteria Match

How to use the Max if Criteria Match

We often work with ranges in Excel where we need to find the largest value based on certain criteria. The MAX IF criteria match helps us to find the largest value within a range of cells based on a specific condition. In this tutorial, we will learn how to use the MAXIF criteria match in Excel.

Figure 1. Example of Using the Max if Criteria Match

Generic Formula

{=MAX(IF(criteria_range=criteria,value_range))}

  • Criteria_range: This is a required value. It is an array of heterogeneous values contain subsets of homogeneous values. It is the filter boundary.
  • Criteria: This value is required as well. It is the actual value that we check in the criteria range.
  • Value_range: Value_range is also a required value. This is the array list of values. We look to find the largest from this array based on the criteria from the criteria_range.

How this formula works

This formula is based on the MAX and IF functions. First, IF tests whether the criteria_range contains the criteria value. As we compare the criteria with an array, Excel will return an array as the result. This array will contain the logical values TRUE or FALSE. The TRUE values will exist where the criteria exists within the criteria_range. The IF function will return an array consisting of the values from value_range. Here the criteria exists in the criteria_range. Finally, MAX extracts the max value from this array returned by IF.

Setting Up Data

The following example uses a beverage sale data set. Column A, B and C has the beverage names, quantity and sales.

Figure 2. The Sample Beverage Sales Data Set

To find the largest revenue among the beverages in column C:

  • Go to cell F7.
  • Assign the formula =MAX(IF(A2:A20=F6,C2:C20)) to cell F5.
  • Press CTRL + SHIFT + ENTER as it is an array formula.

Figure 3. Applying the Formula to the data

This will show the max sales among the beverages in F7.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

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

Another blog reader asked this question today on Excelchat:

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co

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

Another blog reader asked this question today on Excelchat:

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc