I have a simple calculation with a twist -- I need to get a maximum value.

Price per unit is $50, but only up to a maximum of 8 units. From 8-20, the maximum total price is $400.

How do I get that result?

Thanks for any help.

David