VBA code calculate commissions

diney06

New Member
Joined
Mar 8, 2013
Messages
2
Status B & C: commission + 3% bonus ; Status A: commission only

Status A is calculating correctly, but B & C is not. I'd appreciate any help with this.


If StatusCode <> "A" Then
Bonus = 0.03
Commission = CommissionRate * Bonus * SalesAmount
Else
Bonus = 1
Commission = CommissionRate * SalesAmount
End If

Range("D" & nRow).Value = Commission

Continue = MsgBox("Input another line?", vbYesNo, "Continue?")
If Continue = vbYes Then Commissions
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi and Welcome to the Board,

The formula would depend on whether the 3% bonus is to be applied to the total of the Sales Amount and Commission or just the Sales Amount.

If it's both, the formula would be:
Bonus = 1.03
Commission = CommissionRate * Bonus * SalesAmount

If the bonus applies only to the Sales Amount, the formula would be:
Bonus = 0.03
Commission = (CommissionRate + Bonus) * SalesAmount
 
Upvote 0
Thank you! I thought it was only applying to the SalesAmount but Both is what I was actually needing. Much appreciated! :)
 
Upvote 0

Forum statistics

Threads
1,215,329
Messages
6,124,301
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top