Request to simplify multiple nested if formula for bonus factor

excelrequest

New Member
Joined
Dec 7, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Can anyone please help me in converting the proportionate If Else ( basically cross multiplication for identifying single variable for input value in Cell F3) formula using XLOOKUP or using any other functions in the attached proportionate calculator that i have done using nested IF else statement in cell G3.
1607320397440.png


Formula used in cell G3
1607320437365.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Cross posted Request to simplify multiple nested if formula for bonus factor

While we do allow 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 elsewhere.
 
Upvote 0
Cross posted Request to simplify multiple nested if formula for bonus factor

While we do allow 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 elsewhere.
My apologies. I will ensure cross postings do not happen in future.
 
Upvote 0
Possibly:

Book2
ABCDEFGH
1
2MeasureThresholdTargetMax for 1.5xMax for 2xInput ResultsResult
3Total Sales25751001251151.81.8
4Department Sales1015202515.41.041.04
5Expense Management75808595790.80.8
6Payout Opportunity011.52
7
8Total Multiplier2.84
Sheet12
Cell Formulas
RangeFormula
G3:G5G3=IF(F3<B3,0,IF(F3<C3,((F3-B3)*($C$6-$B$6)/(C3-B3)+$B$6),IF(F3>=C3,IF(F3<D3,((F3-C3)*($D$6-$C$6)/(D3-C3)+$C$6),IF(F3>=D3,IF(F3<E3,((F3-D3)*($E$6-$D$6)/(E3-D3)+$D$6),2))))))
H3:H5H3=IF(F3<B3,0,IF(F3>=E3,2,LOOKUP(F3,B3:E3,(F3-B3:E3)*(C$6:F$6-B$6:E$6)/(C3:F3-B3:E3)+B$6:E$6)))
G8G8=SUM(G3:G4)


Note that the result for row 5 is different from yours. Your numbers are apparently off, since I'd expect the values in B:E to be in ascending order, which is not the case in your example. I tweaked them a bit in my example.
 
Upvote 0
Possibly:

Book2
ABCDEFGH
1
2MeasureThresholdTargetMax for 1.5xMax for 2xInput ResultsResult
3Total Sales25751001251151.81.8
4Department Sales1015202515.41.041.04
5Expense Management75808595790.80.8
6Payout Opportunity011.52
7
8Total Multiplier2.84
Sheet12
Cell Formulas
RangeFormula
G3:G5G3=IF(F3<B3,0,IF(F3<C3,((F3-B3)*($C$6-$B$6)/(C3-B3)+$B$6),IF(F3>=C3,IF(F3<D3,((F3-C3)*($D$6-$C$6)/(D3-C3)+$C$6),IF(F3>=D3,IF(F3<E3,((F3-D3)*($E$6-$D$6)/(E3-D3)+$D$6),2))))))
H3:H5H3=IF(F3<B3,0,IF(F3>=E3,2,LOOKUP(F3,B3:E3,(F3-B3:E3)*(C$6:F$6-B$6:E$6)/(C3:F3-B3:E3)+B$6:E$6)))
G8G8=SUM(G3:G4)


Note that the result for row 5 is different from yours. Your numbers are apparently off, since I'd expect the values in B:E to be in ascending order, which is not the case in your example. I tweaked them a bit in my example.
Dear Eric, Wow! thanks a ton for making that formula tighter and efficient for Total Sales and Department Sales for which higher the sales the proportionately higher the payout factor. Sorry that i didn't make it clear on the expense management metric i.e at cell G5. My intent was to make it reverse. i.e the lesser the expense i.e if the expense is $75/- then the payout fact should be max on the continuum at 2X while if the expense management ( i.e cost of running the business) is high at 95 should be 0 payout. Can i kindly request you to tweak it at your convenience...
 
Upvote 0
The way I shortened the formula is by taking advantage of repeated sub-structures in your original formula. Since I did not realize that row 5 was intended to have a descending set of values, the formula assumes that everything is ascending. If that is not the case, then the formula will not work. To fix it, it would require more than doubling the size of it. If that were the case, you'd be better off with your original formula. But even then, you would have the same formula in G3:G4, and G5 would have to be different.

But the relationship on row 5 still seems to be linear, just in the other direction. It's possible to remap those values into an ascending order with a simple trick. Just subtract all the values in B5:F5 from 100, which I assume is the maximum value. This would change these values
95, 85, 80, 75, 79 (79 being the result) to
5, 15, 20, 25, 21. Then your sheet would look like:

Book2
ABCDEFGH
1
2MeasureThresholdTargetMax for 1.5xMax for 2xInput ResultsResult
3Total Sales25751001251151.81.8
4Department Sales1015202515.41.041.04
5Expense Management5152025211.61.6
6Payout Opportunity011.52
7
8Total Multiplier4.44
Sheet12
Cell Formulas
RangeFormula
G3:G5G3=IF(F3<B3,0,IF(F3<C3,((F3-B3)*($C$6-$B$6)/(C3-B3)+$B$6),IF(F3>=C3,IF(F3<D3,((F3-C3)*($D$6-$C$6)/(D3-C3)+$C$6),IF(F3>=D3,IF(F3<E3,((F3-D3)*($E$6-$D$6)/(E3-D3)+$D$6),2))))))
H3:H5H3=IF(F3<B3,0,IF(F3>=E3,2,LOOKUP(F3,B3:E3,(F3-B3:E3)*(C$6:F$6-B$6:E$6)/(C3:F3-B3:E3)+B$6:E$6)))
G8G8=SUM(G3:G5)


You'd probably want to put a note on the sheet explaining the process on row 5.

If this doesn't work for you, I don't know what else to suggest, other than using your original formula(s).
 
Upvote 0
Solution
The way I shortened the formula is by taking advantage of repeated sub-structures in your original formula. Since I did not realize that row 5 was intended to have a descending set of values, the formula assumes that everything is ascending. If that is not the case, then the formula will not work. To fix it, it would require more than doubling the size of it. If that were the case, you'd be better off with your original formula. But even then, you would have the same formula in G3:G4, and G5 would have to be different.

But the relationship on row 5 still seems to be linear, just in the other direction. It's possible to remap those values into an ascending order with a simple trick. Just subtract all the values in B5:F5 from 100, which I assume is the maximum value. This would change these values
95, 85, 80, 75, 79 (79 being the result) to
5, 15, 20, 25, 21. Then your sheet would look like:

Book2
ABCDEFGH
1
2MeasureThresholdTargetMax for 1.5xMax for 2xInput ResultsResult
3Total Sales25751001251151.81.8
4Department Sales1015202515.41.041.04
5Expense Management5152025211.61.6
6Payout Opportunity011.52
7
8Total Multiplier4.44
Sheet12
Cell Formulas
RangeFormula
G3:G5G3=IF(F3<B3,0,IF(F3<C3,((F3-B3)*($C$6-$B$6)/(C3-B3)+$B$6),IF(F3>=C3,IF(F3<D3,((F3-C3)*($D$6-$C$6)/(D3-C3)+$C$6),IF(F3>=D3,IF(F3<E3,((F3-D3)*($E$6-$D$6)/(E3-D3)+$D$6),2))))))
H3:H5H3=IF(F3<B3,0,IF(F3>=E3,2,LOOKUP(F3,B3:E3,(F3-B3:E3)*(C$6:F$6-B$6:E$6)/(C3:F3-B3:E3)+B$6:E$6)))
G8G8=SUM(G3:G5)


You'd probably want to put a note on the sheet explaining the process on row 5.

If this doesn't work for you, I don't know what else to suggest, other than using your original formula(s).
Thanks very much Eric. I would retain my original formula for row 5, Cell G5. As you suggested, all i need to do is input the Threshold, Target, Max for 1.5x, Max for 2x values in reverse order. i.e B5,C5,D5 & E5 to 25, 20, 15 & 10 respectively so that i can get the desired results with my original formula. Once again thank you very Eric for reviewing my formulas. As i am new to the forum, can you please let me know how do i show appreciation to your efforts? Like Stars **** etc?
 
Upvote 0
To show appreciation, a "thank you" to the thread is appropriate. There are 2 automated mechanisms you can also use. You can mark the post as a solution (which you've done), and/or you can click the "Like" button on the bottom right corner of each post.

In any event, I'm glad that you got it working for you! :cool:
 
Last edited:
Upvote 0
@excelrequest
When you mark a post as the solution, you are meant to select the post that helped you the most, not your post saying it worked. ;)
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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