ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with this formula plz? (https://www.excelbanter.com/excel-discussion-misc-queries/100104-help-formula-plz.html)

nick

Help with this formula plz?
 
=IF(A1="F",IF(A2<"",LOOKUP(A2,"CAS",2440;"EMF",24 10;"ENG",2660;"INP",2450;"POL",2420;"SLS",2100}),2 280),IF(A1="T",IF(A2<"",LOOKUP(A2,{"SRP",3130;"TB B",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

Toppers

Help with this formula plz?
 
I suggest you considering use VLOOKUP to get exact match as LOOKUP defaults
to "closest".

"nick" wrote:

=IF(A1="F",IF(A2<"",LOOKUP(A2,"CAS",2440;"EMF",24 10;"ENG",2660;"INP",2450;"POL",2420;"SLS",2100}),2 280),IF(A1="T",IF(A2<"",LOOKUP(A2,{"SRP",3130;"TB B",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


RagDyeR

Help with this formula plz?
 
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!
================================================== ===

"nick" wrote in message
...
=IF(A1="F",IF(A2<"",LOOKUP(A2,"CAS",2440;"EMF",24 10;"ENG",2660;"INP",2450;"
POL",2420;"SLS",2100}),2280),IF(A1="T",IF(A2<"",L OOKUP(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



nick

Help with this formula plz?
 
Thank yoou

"RagDyeR" wrote:

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!
================================================== ===

"nick" wrote in message
...
=IF(A1="F",IF(A2<"",LOOKUP(A2,"CAS",2440;"EMF",24 10;"ENG",2660;"INP",2450;"
POL",2420;"SLS",2100}),2280),IF(A1="T",IF(A2<"",L OOKUP(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




nick

Help with this formula plz?
 
Thank you

"Toppers" wrote:

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

"nick" wrote:

=IF(A1="F",IF(A2<"",LOOKUP(A2,"CAS",2440;"EMF",24 10;"ENG",2660;"INP",2450;"POL",2420;"SLS",2100}),2 280),IF(A1="T",IF(A2<"",LOOKUP(A2,{"SRP",3130;"TB B",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



All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com