Need formula to I have too many nested level

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

=IF(O6=P6,P6*K6/J6,IF(O6<P6,O6*K6/J6,IF(O6>P6,P6*K6/J6+AQ6*K6/J6*1.5,IF(U6=V6,V6*K6/J6,IF(U6<V6,U6*K6/J6,IF(U6>V6,U6*K6/J6+AU6*K6/J6*1.5,IF(aa6=ab6,ab6*K6/J6,IF(aa6<ab6,aa6*K6/J6,IF(aa6>ab6,aa6*K6/J6+Ay6*K6/J6*1.5,0))))))

I need this formula but a simplified one can some one please help
 
Try

=IF(O6<=P6,O6*K6/J6,IF(O6>P6,P6*K6/J6+AQ6*K6/J6*1.5,IF(U6<=V6,U6*K6/J6,IF(U6>V6,U6*K6/J6+AU6*K6/J6*1.5,IF(AA6<=AB6,AA6*K6/J6,IF(AA6>AB6,AA6*K6/J6+AY6*K6/J6*1.5,0))))))

Hope this helps,

Hutch
 
Mike said:
=IF(O6=P6,P6*K6/J6,IF(O6<P6,O6*K6/J6,IF(O6>P6,P6*K6/J6+AQ6*K6/J6*1.5,
IF(U6=V6,V6*K6/J6,IF(U6<V6,U6*K6/J6,IF(U6>V6,U6*K6/J6+AU6*K6/J6*1.5,
IF(aa6=ab6,ab6*K6/J6,IF(aa6<ab6,aa6*K6/J6,IF(aa6>ab6,aa6*K6/J6+Ay6*K6/J6*1.5,0))))))

I need this formula but a simplified one can some one please help

There is something very wrong with your logic. O6 can only be equal to,
less than or greater than P6. So only one of the first 3 conditions will
apply, namely:

=IF(O6=P6, P6*K6/J6, IF(O6<P6, O6*K6/J6,
IF(O6>P6, P6*K6/J6+AQ6*K6/J6*1.5, "never happens!")))

Is that what you really want? I doubt it. But if it is, that can be
simplified as follows:

=(MIN(O6,P6) + (O6>P6)*AQ6*1.5)*K6/J6

However, I wonder if you meant AQ6*K6/(J6*1.5) at the end. If so, then:

=(MIN(O6,P6)/J6 + (O6>P6)*AQ6/(J6*1.5))*K6
 
Back
Top