Explain the Formula

Memon

Board Regular
Joined
Jan 21, 2014
Messages
56
I copied a formula from the internet and I want to understand what does it do & how does it work..

Code:
=ROUND(MAX(IF($W$8,MAX(0,SUM(H$12:H12)+G13-$W$9),0),IF($W$5,IF(G13>$W$6,G13-$W$6,0),0)),2)

thanks in advance
 
One last thing: can you tell me what that expression mean ?

Well suppose you are participating in a quiz and so far your prize money is $100.
Now you have the choice: either you take the $100 or you continue and have a chance of winning a $1000 refrigerator with the risk of loosing the $100.
So you "proceed for the refrigerator".

In other words you had some interim results already and now you proceed for the definitive result.
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
By the way, the original

Code:
=ROUND(MAX(IF($W$8,MAX(0,SUM(H$12:H12)+G13-$W$9),0),IF($W$5,IF(G13>$W$6,G13-$W$6,0),0)),2)

can be simplified to

Code:
=ROUND(MAX(0,$W$8*(SUM(H$12:H12)+G13-$W$9),$W$5*(G13-$W$6)),2)
 
Upvote 0
By the way, the original

Code:
=ROUND(MAX(IF($W$8,MAX(0,SUM(H$12:H12)+G13-$W$9),0),IF($W$5,IF(G13>$W$6,G13-$W$6,0),0)),2)

can be simplified to

Code:
=ROUND(MAX(0,$W$8*(SUM(H$12:H12)+G13-$W$9),$W$5*(G13-$W$6)),2)

Shouldn't the simplification be :-
Code:
=ROUND(MAX(0,$W$8*(SUM(H$12:H12)+G13-$W$9),$W$5*(G13>$W$6)*(G13-$W$6)),2)
otherwise you lose the fact that G13 has to be greater than W6.

hth
 
Upvote 0
Shouldn't the simplification be :-
Code:
=ROUND(MAX(0,$W$8*(SUM(H$12:H12)+G13-$W$9),$W$5*(G13>$W$6)*(G13-$W$6)),2)
otherwise you lose the fact that G13 has to be greater than W6.

hth
Hi, actually not: that is already caught by MAX(0 ...
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,963
Members
449,200
Latest member
indiansth

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