Yes, that makes sense! To set a maximum value of
200 for your formula result, you can use the
MIN function in Excel. Here's how:
- Start by writing your formula to multiply the rate by the quantity, as you have already done. For example, if your rate is in cell A1, your quantity is in cell A2, and your formula is in cell A3, your formula might look like this:
- To cap the result at 200, wrap your formula in the MIN function. The MIN function takes two or more arguments and returns the smallest value. In this case, we want to return the result of our formula if it's less than or equal to 200, and return 200 if it's greater than 200. Here's what the new formula would look like:
Code:
=MIN(A1*A2*0.05, 200)
- Press Enter to calculate the result. If the result of your formula is less than or equal to 200, the MIN function will return that value. If the result is greater than 200, the MIN function will return 200.
That's it! Now your formula will always return a value that is capped at 200.