=IF(A12 < B$8, $B7*A12, B$7*B$8 + B$9(A12 - B$9))