To illustrate, let’s look at two examples.

A free lunch with MAX

Let’s say you have a $50 credit at a restaurant.

It’s a one-time use credit that expires tomorrow, so you take your friend to dinner today.

Balance is negative when credit > total

You split a salad, a pizza, and a couple of beers.

But what happens when the credit is greater than the total?

The IF function now catches negative results and returns zero instead.

Balance is negative when credit > total

This works, but the approach is ugly and redundant.

There must be a more direct approach?

Yes, indeed, with the MAX function.

Balance is negative when credit > total

That’s true, but MAX works equally well with small, even tiny, sets of data.

Negative values are banished and never make it to the final result.

Pretty cool, huh?

Balance is negative when credit > total

In other words, use 1.5% to calculate the fee, but cap the result at $3,000.

To help you out, we maintain alarge collection of sample formulasyou can browse and study.

This is a great way to find specific solutions to many problems you’re likely to encounter in Excel.

Balance is negative when credit > total

We also have agood library of video coursesto help you learn quickly in a more structured environment.

Typical IF formula to trap a negative balance

MAX returns a positive balance, or zero

Using the IF function to calculate a capped fee

Using the MIN function to calculate a capped fee

Using the IF function to calculate a capped fee

Using the MIN function to calculate a capped fee