I am still not clear about which amount to use for 5% credit: So I will give you two solutions:

Assuming Cell D5 has your baseline and E5 has actual sale:

#1:
You give 5% credit for exceeded mount: for example:

If baseline is $100, Sale is $114, you want to give 5% of $14 = 0.70 in credit
If baseline is $100, Sale is $130, you want to give 5% of $15 = 0.75 in credit

if So:

=IF(E5>D5, MIN((E5-D5)*5%, (15%*D5)*5%),0)

#2:

You give 5% credit of actual sale amount then

=IF(E5>D5, MIN(E5*5%,115%*D5*5%),0)


Hope this helps...