samedi 18 juin 2016

excel implement an if statement inside another if statement

I need to implement an IF statement inside another IF statement in excel!

 =IF(DataInput!$D$5 = "James Herriot Freight", 
    ROUND(  (.0025 * I4 + .75 * O4) * T4, 2), 

 IF( DataInput!$D$5 = "Siegfried Farnon Transport", 
    ROUND(  1.5+ IF(O4 > 1.0, (O4 – 1.0) * 0.5, 0) * T4, 2), 

 "ERROR: Invalid Recommended MarkUp Type" 

 )  )

The inner IF statement is doing a completely different check, unreleated to DataInput!$D$5. Is this even possible in excel, or do I need to look in to maybe rewriting the whole thing with and, and or as part of what I need to do? Or do I have an error somewhere else?

Aucun commentaire:

Enregistrer un commentaire