Formeloptimierung if + vlookup
23.11.2006 11:55:08
HeinzS
bitte nicht lachen, aber derzeit fällt mir keine andere Formel für meine Kalkulation ein. Worum geht´s? Ich habe mehrere Datensätze, die ich bei Offerterstellung mit den Preisen aktualisiere (können bis zu 15.tsd sein). Wichtig dabei ist, ob es sich um eine Standardpreis handel (InfoBlatt!$D$11), welche Tariffzone betroffen ist (Calcuation_Sheet!$U4, und das Service (Calcuation_Sheet!L4). Wenn nun alle 3 Bedingungen übereinstimmen, dann soll der entsprechende Preis ermittelt werden.
Jetzt meine Formel (ist mir echt peinlich!):
=IF(Calculation_Sheet!$L4="Economy Express",0,
IF(AND(InfoBlatt!$D$11<>15,Calculation_Sheet!$U4="1",Calculation_Sheet!$L4<>"Economy Express"),VLOOKUP(Calculation_Sheet!$AO4,ST_Ratecardstructure!$A$33:$K$193,2),
IF(AND(InfoBlatt!$D$11<>15,Calculation_Sheet!$U4="2",Calculation_Sheet!$L4<>"Economy Express"),VLOOKUP(Calculation_Sheet!$AO4,ST_Ratecardstructure!$A$33:$K$193,3),
IF(AND(InfoBlatt!$D$11<>15,Calculation_Sheet!$U4="3",Calculation_Sheet!$L4<>"Economy Express"),VLOOKUP(Calculation_Sheet!$AO4,ST_Ratecardstructure!$A$33:$K$193,4),
IF(AND(InfoBlatt!$D$11<>15,Calculation_Sheet!$U4="4",Calculation_Sheet!$L4<>"Economy Express"),VLOOKUP(Calculation_Sheet!$AO4,ST_Ratecardstructure!$A$33:$K$193,5),
IF(AND(InfoBlatt!$D$11<>15,Calculation_Sheet!$U4="5",Calculation_Sheet!$L4<>"Economy Express"),VLOOKUP(Calculation_Sheet!$AO4,ST_Ratecardstructure!$A$33:$K$193,6)))))))
Das ganze kann bis zu 8 Zonen gehen. Ich bin mir sicher, daß es dazu eine effiktivere Formel geben muß.
Kann mir wer von Euch dazu eine Anregung geben, wie ich diese Formel optimieren kann.
Danke,
Heinz