Nested If Statements to calculate Bonus for Speed (# of Days) and % Above/Below Target Price

bsteelman

New Member
Joined
Mar 8, 2018
Messages
2
New to the forum (Hello!), please forgive me if I am posting my question(s) incorrectly. I have been working on this all day and have hit a wall.

The table that I am building is below:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
1
Property
Target
Price

Actual
Price

Sales Fee %
Sales Fee
Date 1
(Start)

Date2
(Finish)

Date 2 is > than 270d from Date1
Date2 is < 270d from Date1
Date2 is < 180d from Date1
Speed
Bonus
1

Actual Price is >15% +
Above/Below
Target Price

Actual Price is 10-15% +
Above/Below Target Price

Actual Price is 0-10% +
Above/Below
Target Price

Price Bonus(Penalty)
2

Total Sales Fee
2
Site 1
$70,000
$90,000
3.00%
$2,700
1/1/2018
5/1/2018
0.00%
0.25%
0.50%
$450
0.50%
0.25%
0.00%
$(450)
$2,700
3
Site 2
28.57%
4
Site 3

<tbody>
</tbody>

What I am trying to do is write a formula for Cells K2 and P2 that provide a sales bonus for both Speed and Price respectively.

K2 - Speed Bonus formula that calculates the appropriate bonus based on time it takes to complete sale (Date 2- Date 1)
Example. Date 2 < 180d from Date 1 then (.50% * C2 = Bonus),
Date 2 > 180d, but < 270d, from Date 1 then (.25% * C2 = Bonus), and
Date 2 > 270d from Date 1 then (0.0% * C2 = Bonus)


P2 - Price Bonus formula that calculates a bonus or a penalty depending on % of "Actual Price" above/below the "Target Price"
Example:
If "Actual Price" is <10% Above/Below the "Target Price" than apply a 0% Bonus or Penalty (0.00% * "Actual Price").
If "Actual Price" is >10% Above or Below the "Target Price", but < 15% Above of Below the "Target Price", apply a +.25% Bonus/Penalty (+.25% * "Actual Price")
IF "Actual Price" is > 15% of the "Target Price", apply a +.50 Bonus or Penalty (+.50% * "Actual Price")

I am playing with nested if statements for both of these but have failed miserably all day.
Can anyone help me?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Cell K2:
=IF(DATEDIF(F2,G2,"D")<=180,C2*J2,IF(DATEDIF(F2,G2,"D")<=270,C2*I2,C2*H2))

Cell P2:
=IF(ABS((B2-C2)/C2)<=0.1,SIGN(B2-C2)*C2*O2,IF(ABS((B2-C2)/C2)<=0.15,SIGN(B2-C2)*C2*N2,SIGN(B2-C2)*C2*M2))
 
Upvote 0
Hi,

try this:


Book1
ABCDEFGHIJKLMNOP
1PropertyTarget PriceActual PriceSales Fee %Sales FeeDate 1 (start)Date2 (finish)Date 2 is > than 270d from Date1Date2 is < 270d from Date1Date2 is < 180d from Date1Speed Bonus 1Actual Price is >15% + Above/Below Target PriceActual Price is 10-15% + Above/Below Target PriceActual Price is 0-10% + Above/Below Target PricePrice Bonus(Penalty)Total Sales Fee
2Site 1$70.000,00$90.000,003,00%$ 2.700,001-1-20185-1-20180.00%0.25%0.50%$ 450,000.50%0.25%0.00%$ 450,00$2,700
3Site 2
4Site 3
Sheet1
Cell Formulas
RangeFormula
K2=LOOKUP(G2-F2,{0;180;270},{0.5;0.25;0})%*C2
O2=LOOKUP((C2/B2-1),{-1;-0.15;-0.1;0;0.1;0.15;1},{-0.5;-0.5;-0.25;0;0.25;0.5;0.5})%*C2
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,981
Members
449,058
Latest member
oculus

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