How can I use both MIN and MAX functions in the same formula in Excel? 2

How can I use both MIN and MAX functions in the same formula in Excel?

The ability to use both the MIN and MAX functions in the same formula in Excel allows users to efficiently calculate the smallest and largest values within a given range. This feature is particularly useful for analyzing data sets and finding the minimum and maximum values within a set of data. By incorporating both functions into a single formula, users can quickly determine the range of values and identify any outliers or extreme values. This capability enhances the overall functionality of Excel and enables users to perform complex calculations with ease.

Excel: Use MIN and MAX in Same Formula


You can use the MIN and MAX functions in Excel to calculate the minimum and maximum values, respectively, for a specific range.

However, sometimes you may wish to use both the MIN and MAX functions in the same formula.

The following example shows how to do so in Excel.

Example: How to Use MIN and MAX in Same Formula in Excel

Suppose we have the following dataset in Excel that contains information about exam scores for various students in some class:

The exam scores should only be allowed to range from 0 to 100, but notice that some scores are below or above these limits.

We can type the following formula into cell C2 to utilize the MIN and MAX functions in Excel to change any values greater than 100 to be equal to 100 and any values less than 0 to be equal to 0:

=MAX(MIN(B2,$B$16),$B$15)

We can then click and drag this formula down to each remaining cell in column C:

Excel MIN and MAX in same formula

If the exam score is between 0 and 100, the formula simply returns the exam score.

However, if the exam score is greater than 100 then the formula returns 100.

Similarly, if the exam score is less than 0, then the formula returns 0.

How This Formula Works

Recall the formula that we used to convert the exam scores to a range between 0 and 100:

=MAX(MIN(B2,$B$16),$B$15)

First, the formula uses MIN to calculate the minimum value between cell B2 and cell B16

For example, in the first cell this would return 68.

Next, the formula uses MAX to calculate the max value between 68 and cell B15.

For example, in the first cell this returns 68.

Note: There are many ways to use the MIN and MAX functions in Excel in the same formula. This example simply illustrates one way to do so.

The following tutorials explain how to perform other common tasks in Excel:

Cite this article

stats writer (2024). How can I use both MIN and MAX functions in the same formula in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-both-min-and-max-functions-in-the-same-formula-in-excel/

stats writer. "How can I use both MIN and MAX functions in the same formula in Excel?." PSYCHOLOGICAL SCALES, 22 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-both-min-and-max-functions-in-the-same-formula-in-excel/.

stats writer. "How can I use both MIN and MAX functions in the same formula in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-both-min-and-max-functions-in-the-same-formula-in-excel/.

stats writer (2024) 'How can I use both MIN and MAX functions in the same formula in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-both-min-and-max-functions-in-the-same-formula-in-excel/.

[1] stats writer, "How can I use both MIN and MAX functions in the same formula in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I use both MIN and MAX functions in the same formula in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top