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.

Conditional mode with criteria

We can use an array formula that is based on IF and MODE function to calculate a conditional mode with one or more criteria. This post looks at how we can use these two functions to calculate conditional mode with criteria.

Figure 1: How to calculate conditional mode with criteria

General syntax of the formula

{=MODE(IF(criteria, data))}

How the formula works

  • It is important to note that the MODE function has got no built-in way to apply any criteria.
  • This means that the function will return the most occurring number in any range supplied to it.
  • We need to use the IF function to apply a given criteria, which tests the data value in the group to see if it matches the supplied criteria.
  • The logical test is based on an array containing multiple values, thus the result should also be an array of TRUE FALSE.
  • Here, each TRUE will represent a row with “B” as the group, as in our above example. The IF function will then return the corresponding value for each TRUE in the array. FALSE values will not be changed.
  • In our example above, we shall have an array of results that looks more like the one below;

{4;FALSE;5;FALSE;4;FALSE;2;FALSE;3;FALSE}

  • The array will then be taken to the MODE function so that we can get the most frequently occurring value in the group. In our example, this value is C which appears 5 times.
  • It is important to note that the formula is an array formula, thus needs to be entered in an array format.

Instant Connection to an Expert through our Excelchat Service

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