Please I need some help on this IF function that should be pretty easy, but I
cannot figure it out...
I want to use this function to automatically discount the price of a certain
product if overstocked.

Column "A" contains the Maximum Stock allowed.
Anything over this Max Stock level should go "On Sale", depending on the
overstock value.
Greater the overstock, greater the discount.
(I just need two discount level: -20% Discount for items up to 50% over the
Maximun Stock Allowed, and -40% Discount for items over 50% the Maximum Stock
Allowed).
In my example I use a product with 10 pcs Max Stock, therefore:
If the product is OVER 10 but BELOW 15, will go On Sale at -20%,
If the product is any value OVER 15 will go On Sale at -40%.

Column "B" contains the actual inventory/units for the specific product,

Column "C" contains the Regular Retail Price for the product.

Column "D" is the result of the IF function: the Sale Price. This single
formula should give the "On Sale" prices as shown in sample scenarios below:

Scenario 1:
A (Max Stock) B (Actual Inventory) C (List Price) D
(Sale Price)
10 8 $100.00
$100.00
(Item is not in overstock: Sale Price stay the same like List Price)

Scenario 2: (Product slightly in overstock 14 pcs)
A (Max Stock) B (Actual Inventory) C (List Price) D
(Sale Price)
10 14 $100.00
$80.00
(Item is overstock but not seriously being the Qty. 14 below 15 which is the
Max Stock Level + 50%: Sale Price will be -20% from List Price)


Scenario 3: (Product seriously in Overstock: 19 pcs)
A (Max Stock) B (Actual Inventory) C (List Price) D
(Sale Price)
10 19 $100.00
$60.00
(Item is seriously in Overstock being ABOVE 15 which is the Max Overstock +
50%:
Sale Price will be -40% from List Price)

==========================================

Thank you for helping!