Advanced nested if with several conditions

Lucerobrima

New Member
Joined
Jun 18, 2018
Messages
3
https://docs.google.com/spreadsheets/d/16usEk9KrUYyuaZImKxybGZaiLzWUzk-qegXXrN5r7rc/edit?usp=sharing


<bdo dir="ltr">=IF(OR(C15;D15="";B15*$B$3;IF(B15;D15="";C15*$C$4;IF(B15;C15="";D15*D5;IF(D15="";B15*$B$6+C15*$C$6;IF(B15="";C15*$C$7+D15*$D$7;IF(C15="";B15*$B$8+D15*$D$8;IF(D15="";B15*$B$9+C15*$C$9;IF(B15="";C15*$C$10+D15*$D$10;IF(B15:D15=ISNUMBER;B15*$B$11+C15*$C$11+D15*$D$11))))))))))

This formula is supposed to work with the 9 different scenarios but It doesn´t, you can see the SHEETS in drive to see how does the logic work.
</bdo>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Yep. That's ugly. What's the difference between Condition 4 and Condition 7? Also, what's the difference between Condition 5 and Condition 8? They look the same.

Refactoring the order of the conditions makes this much easier:


Book1
ABCDEF
1Weight of Variable / Ponderacin de la variable
2TimeCostEarningsTotal
3Condition 1100.00%0.00%0.00%100.00%
4Condition 20.00%100.00%0.00%100.00%
5Condition 350.00%50.00%0.00%100.00%
6Condition 40.00%0.00%100.00%100.00%
7Condition 550.00%0.00%50.00%100.00%
8Condition 60.00%50.00%50.00%100.00%
9Condition 745.00%20.00%35.00%100.00%
10
11Variable value / Valor de la variable
12TimeCostEarningsGlobal Result
13Condition 10.070.070,07
14Condition 20.060.060,06
15Condition 30.080.080,08
16Condition 40.020.020.020,02
17Condition 50.040.040.040,04
18Condition 60.050.050.050,05
19Condition70.030.030.030,03
20Condition 80.020.020.020,02
21Condition 90.120.150.160.140,14
Sheet1
Cell Formulas
RangeFormula
E13=SUMPRODUCT($B13:$D13,INDEX($B$3:$D$9,--($B13<>"")+2*--($C13<>"")+4*--($D13<>""),))


WBD
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
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