Creating multiple conditons to select the highest between two conditions

guttal

New Member
Joined
Nov 18, 2011
Messages
18
I'm working on a commission schedule that pays out depending on which is higher, units or dollars based on three tiers. I'm using an if(and statement which seems to be working until I get to the third tier then the logic falls apart. The tiers are setup like this:

Units$ MIN$ MAXCommission %
30600,000.50
8600,0011,600,000.55
91,600,001.60

<tbody>
</tbody>

I want to pay the commission % based on the higher of the unit numbers or dollar amount whichever is higher. I would like the total commission to be paid expressed as a dollar amount. My Q column represents the resulting commission I expect to pay based on the larger of O or P.

My data is setup as follows:

NOPQ
MonthUnits Sold$ SoldCommission I expect to pay
1January2425000.50
2February1330000.50
3March2618000.55
4April1175000.50
5May5599000.55
6June81500000.55
7July71600010.55
8August101500000.60
9September91700000.60
10October2800000.55

<tbody>
</tbody>


The formula I created is:

=IF(AND($O$8<=3,$P$8<=600000),($P$8*0.005),IF(AND($O$8>3,$O$8<=8),($P$8*0.0055),IF(AND($P$8>=600001,$P$8<1600000),($P$8*0.0055),IF($O$8>=9,$P$8*0.006)*IF($P$8>=1600001,$P$8*0.006))))

Am I using the wrong formula for what I want to do? Any suggestions on how I can create the logic to make this work is appreciated.

Thank you
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
(assuming your data starts in row 2) try this
Code:
=IF(OR(O2>=9,P2>=1600000),P2*0.006,IF(OR(O2>3,P2>600000),P2*0.0055,P2*0.005))

In your example, is the commission for July computed correctly? Sold = 1.600.010 (exceeding 1.600.000) which should result in a commission of .006 instead of .0055 if I interpreted your question correctly...
 
Upvote 0
Thank you, you are correct. July should be .006. Thank you for the formula. I'm not sure I'm following the formula. I have to apply it to my spreadsheet to see each condition in action.

Thanks again.
 
Last edited:
Upvote 0
I can explain if you want:

The tiers are setup like this:

Units$ MIN$ MAXCommission %
30600,000.50
8600,0011,600,000.55
91,600,001.60

<tbody>
</tbody>

I want to pay the commission % based on the higher of the unit numbers or dollar amount whichever is higher.

So, you want to pay the highest amount based on either units or $-value. Instead of excluding the lower commission values,
  • I first check whether you have to pay the highest commission (which is the case if either the number of units >= 9 or the $-value exceeds 1.600.000) -> first IF, if this is true you pay 0.006 commission
  • if you do not have to pay 0.006 commission we know that units <= 8 AND $-value <= 1.600.000, so I now check if you have to pay 0.0055 commission. Bearing in mind that units <= 8 AND $-value <= 1.600.000, I only have to check that units > 3 OR $-value > 600000 (second IF)
  • If second if evaluates to false, we know that units <= 3 AND $-value <= 600.000, so we know that we have to pay 0.005 commission
 
Upvote 0
I understand. There's no reason to step through each level if you can eliminate two levels the lowest level is the only option available.

Thank you for the explanation.
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,413
Members
449,449
Latest member
Quiet_Nectarine_

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