Is there a better way to write the following formula?

KiyomiNox

New Member
Joined
Mar 16, 2018
Messages
4
Code:
=IF(OR($B$11=$B$12,$B$12=0),IF($H$10="INTERNET",IF(($H$46*0.25)<300,IF(($H$46*0.25)=0,0,300),($H$46*0.25)),IF(($H$46*0.25)<200,IF(($H$46*0.25)=0,0,200),($H$46*0.25))),(IF($H$10="INTERNET",IF(($H$46*0.25)<300,IF(($H$46*0.25)=0,0,300),($H$46*0.25)),IF(($H$46*0.25)<200,IF(($H$46*0.25)=0,0,200),($H$46*0.25))))/2)

So essentially I use this to determine how much commission someone is supposed to make. Everyone always makes at least $200, but that gets upped to $300 if the sale came from the internet. H46 is the profit of the deal. H10 is the type of deal but "Internet" is the only option that matters. Commission is 25%. B11 & B12 are the sales people because there are occasionally 2 of them so the commission has to be split reducing the minimum to $100 & $150 respectively.

If anyone has any ideas of how to make this a little nicer, I would greatly appreciate it :)

Thanks in advance to everyone who helps!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I also forgot to mention that I have to add that if B11 or B12 (the sales advisor) is set to "House" then the commission is 0.
 
Upvote 0
=($B$11<>"House")*($B$12<>"House")*MAX(200+($H$10="Internet")*100,$H$46*0.25)/IF(OR($B$11=$B$12,$B$12=""),1,2)
 
Upvote 0
Similar in concept to Mopp1's:

=IF(OR($H$46=0,COUNTIF($B$11:$B$12,"House")),0,MAX($H$46*0.25,IF($H$10="INTERNET",300,200)))/IF(OR($B$11=$B$12,$B$12=0),1,2)

But a value of 0 in H46 will result in a 0 commission.
 
Upvote 0
=($B$11<>"House")*($B$12<>"House")*MAX(200+($H$10="Internet")*100,$H$46*0.25)/IF(OR($B$11=$B$12,$B$12=""),1,2)

This is fantastic! Thank you so much! Is there a way I can modify this for the cell that contains the commission for person 2 where it would be 0 if B12=B11? Currently I have:
Code:
=IF(OR($B$11=$B$12,$B$12=0),0,(IF($H$10="INTERNET",IF(($H$46*0.25)<300,IF(($H$46*0.25)=0,0,300),($H$46*0.25)),IF(($H$46*0.25)<200,IF(($H$46*0.25)=0,0,200),($H$46*0.25))))/2)
in that cell which is similar to the original formula.
 
Upvote 0
Ok, so I ended up going with
Code:
=($B$11<>"House")*MAX(200+($H$10="Internet")*100,$H$46*0.25)/IF(OR($B$11=$B$12,$B$12=""),1,2)
for commission 1 and
Code:
=($B$12<>"House")*MAX(200+($H$10="Internet")*100,$H$46*0.25)/IF(OR($B$11=$B$12,$B$12=""),1,2)*($B$11<>$B$12)
for commission 2. Thoughts?
 
Upvote 0
I think you may want to add *($B$12<>"") to your commission 2 formula. That way if B12 is blank then commission 2 will be zero rather than the full commission (which is what it looks like now it would calculate).
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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