Help with If Statement Please

Help with If Statement Please

Good day

I need assistance with an If Statement Please.

I need a function that will do the following:
If "Referral = Yes, Then "Quoted Gross Profit" * 0.30, If "Referral= No, Display 0

Second If statement:
If Referral GP >0, Quoted Gross Profit*0.7 (or Quoted Gross Profit - Referral GP)

Please help

Thanks
Regardt