Sub topic 6
MIN and MAX Basics
Assume you can read a forecast laid out with time periods in columns, copy formulas, and use relative and anchored cell references. You should also know that a financial model uses inputs, formulas, and outputs. This chapter focuses on two functions that limit a value without adding a long conditional formula.
What MIN and MAX return
MIN returns the smallest number in a group. MAX returns the largest number in a group.
=MIN(F20,$C$4)
=MAX(0,F30)The first formula returns the lower of the amount in F20 and the cap in $C$4. The second returns the higher of zero and F30. Therefore, a negative value in F30 becomes zero, while a positive value remains unchanged.
Each function can compare several values:
=MIN(F20,G20,H20)
=MAX(F30,G30,H30)A function argument is a value or reference supplied inside the parentheses. In these examples, each cell reference is an argument.
| Formula | Meaning | Result when the inputs are 12, 20, and 8 |
|---|---|---|
| `=MIN(A1:C1)` | Selects the smallest input | 8 |
| `=MAX(A1:C1)` | Selects the largest input | 20 |
MIN and MAX normally ignore blank cells and text in a referenced range. They do not ignore error values. If one referenced cell contains an error, the result can also show an error.
MIN as a cap
A cap is a maximum permitted amount. Use MIN when a calculated amount must not exceed that limit.
Suppose a bonus equals 10% of a base amount, but the bonus cannot exceed 5,000. Put the bonus rate in C3 and the maximum bonus in C4.
=MIN(F20*$C$3,$C$4)The formula first calculates F20*$C$3. MIN then compares that result with $C$4 and returns the smaller amount. If the calculated bonus is 3,500, the formula returns 3,500. If it is 6,200, the formula returns 5,000.
Keep the input cells anchored with dollar signs when you copy the formula across the forecast. The amount in F20 should change to G20, H20, and so on, but the rate and cap should continue pointing to C3 and C4.
MAX as a floor
A floor is a minimum permitted amount. Use MAX when a result must not fall below a limit.
For example, a model may treat a negative operating result as zero for a calculation:
=MAX(0,F30)If F30 is 18,000, the result is 18,000. If F30 is -2,000, the result is zero. This pattern is useful when a later formula should not apply a charge, allocation, or tax benefit to a negative base.
The floor does not change the source value in F30. It only changes the value returned by this formula. That distinction matters when the original loss is needed elsewhere in the model.
Combining a floor and a cap
You can apply both limits by nesting one function inside the other. For example, to keep a value between zero and 100:
=MIN(100,MAX(0,F20))MAX(0,F20) applies the floor first. It prevents a negative result. MIN(100,...) then applies the cap. The final result cannot be below zero or above 100.
Common errors
- Reversing the functions:
MINcreates a cap, whileMAXcreates a floor. - Leaving an input reference unanchored, causing the cap or floor cell to move when copied.
- Applying the limit to the wrong base. Check whether the model requires a raw value, a positive-only value, or a value already adjusted elsewhere.
- Hiding a genuine error by forcing it to zero. A floor should reflect a business rule, not conceal a broken formula.
- Using a hard-coded limit when the model already has an input cell for that limit. Store assumptions in visible input cells so reviewers can change and audit them.
Exercise
Cell F20 contains -12, and cell C4 contains 100. What does =MIN(100,MAX(0,F20)) return, and which function applies the floor?
Show answer
It returns 0. MAX applies the floor by choosing the larger of 0 and -12; MIN then compares that result with the cap of 100.