Help with this formula plz?

N

nick

=IF(A1="F",IF(A2<>"",LOOKUP(A2,"CAS",2440;"EMF",2410;"ENG",2660;"INP",2450;"POL",2420;"SLS",2100}),2280),IF(A1="T",IF(A2<>"",LOOKUP(A2,{"SRP",3130;"TBB",3160}),3160),""))

Bu tht above formula is actually giving me the closest value even when the
condition is not met. Can someone help me in fixing this in such a way that
if the condition is not met it should error out. Thanks in advance
 
T

Toppers

I suggest you considering use VLOOKUP to get exact match as LOOKUP defaults
to "closest".
 
R

RagDyeR

Try this:

=IF(A1="F",IF(A2<>"",VLOOKUP(A2,{"CAS",2440;"EMF",2410;"ENG",2660;"INP",2450
;"POL",2420;"SLS",2100},2,0),2280),IF(A1="T",IF(A2<>"",VLOOKUP(A2,{"SRP",313
0;"TBB",3160},2,0),3160),""))

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

=IF(A1="F",IF(A2<>"",LOOKUP(A2,"CAS",2440;"EMF",2410;"ENG",2660;"INP",2450;"
POL",2420;"SLS",2100}),2280),IF(A1="T",IF(A2<>"",LOOKUP(A2,{"SRP",3130;"TBB"
,3160}),3160),""))

Bu tht above formula is actually giving me the closest value even when the
condition is not met. Can someone help me in fixing this in such a way that
if the condition is not met it should error out. Thanks in advance
 
Top