Help Calculate Bonus

callmejoe

New Member
Joined
Jan 31, 2019
Messages
1
Hoping someone can help me.

I need to create something that can help calculate a "bonus" if certain items are sold on the same invoice with amount greater than $X.

Something like this:

To qualify employee X needs to sell gallon of milk to qualify priced at least $X, if he can add yogurt and eggs that are at least priced $X or more on the same invoice the employee gets $X.

[TABLE="width: 415"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Invoice[/TD]
[TD]Employee[/TD]
[TD]SKU[/TD]
[TD]Description[/TD]
[TD] Amount [/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD="align: right"]111 [/TD]
[TD]Jeff[/TD]
[TD]A5B355[/TD]
[TD]Hillshire 12[/TD]
[TD] $ 5.00[/TD]
[TD]Eggs[/TD]
[/TR]
[TR]
[TD="align: right"]111 [/TD]
[TD]Jeff[/TD]
[TD]190BDR[/TD]
[TD]Gallon[/TD]
[TD] $ 2.00[/TD]
[TD]Milk[/TD]
[/TR]
[TR]
[TD="align: right"]111 [/TD]
[TD]Jeff[/TD]
[TD]293DKS[/TD]
[TD]32oz Vanilla[/TD]
[TD] $ 3.00[/TD]
[TD]Yogurt[/TD]
[/TR]
[TR]
[TD="align: right"]444 [/TD]
[TD]Carl[/TD]
[TD]98SKOS[/TD]
[TD]Sharp 4oz[/TD]
[TD] $ 2.00[/TD]
[TD]Cheese[/TD]
[/TR]
[TR]
[TD="align: right"]444 [/TD]
[TD]Carl[/TD]
[TD]FBN398[/TD]
[TD]Chocolate [/TD]
[TD] $ 4.00[/TD]
[TD]Cookies[/TD]
[/TR]
</tbody>[/TABLE]

Hope this makes sense.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Joe,
You could try a formula like =IF(AND(F2="milk",SUMIFS(E:E,A:A,A2,F:F,"Eggs")>3,SUMIFS(E:E,A:A,A2,F:F,"Yogurt")>2),"Bonus","") in G2
InvoiceEmployeeSKUDescriptionAmountCategoryBonus
111JeffA5B355Hillshire 12$5.00Eggs
111Jeff190BDRGallon$2.00MilkBonus
111Jeff293DKS32oz Vanilla$3.00Yogurt
444Carl98SKOSSharp 4oz$2.00Cheese
444CarlFBN398Chocolate$4.00Cookies

<tbody>
</tbody>
In the formula the Bonus should be replace with the bonus amount, in this case the bonus is in the first condition, the Milk row

Or you could have a formula like this =IF(AND(SUMIFS(E:E,A:A,A2,F:F,"Milk")>1,SUMIFS(E:E,A:A,A2,F:F,"Eggs")>3,SUMIFS(E:E,A:A,A2,F:F,"Yogurt")>2),"Bonus","") in G2
Here the Bonus is in every row of the invoice, the Bonus has to be replace by the Bonus amount calculation

InvoiceEmployeeSKUDescriptionAmountCategoryBonus
111JeffA5B355Hillshire 12$5.00EggsBonus
111Jeff190BDRGallon$2.00MilkBonus
111Jeff293DKS32oz Vanilla$3.00YogurtBonus
444Carl98SKOSSharp 4oz$2.00Cheese
444CarlFBN398Chocolate$4.00Cookies

<tbody>
</tbody>

The values >1 >3 and >2 are the $ values that has to be surpassed (at least priced $X)

The problem is that this formula will increase rapidly as you add more Bonus rules

You could create a UDF formula with many, many bonus rules, but that will take a couple hours to program

Cheers
Sergio
 
Last edited:
Upvote 0
Cross posted https://www.excelforum.com/excel-general/1262479-help-calculate-bonus.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Hello Sergio
You don't need to do anything.
The message was aimed at the OP, who will hopefully respond & let you know if your suggestion worked
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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