![]() |
Long formula
I wanted to shorten this formula throw lookup function. Please help me on this.
=If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
Long formula
=CHOOSE(A1,"a","b","C","D","V","")
-- David Biddulph "jai" wrote in message ... I wanted to shorten this formula throw lookup function. Please help me on this. =If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
Long formula
=CHOOSE(A1,"A","B","C","D","V")
nice and compact -- Gary''s Student - gsnu200745 "jai" wrote: I wanted to shorten this formula throw lookup function. Please help me on this. =If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
Long formula
Hi Jai,
One way, Put your values in a table format out of the way somewhere. Say like this L1: 1 M1: a L2: 2 M2: b L3: 3 M3: C L4: 4 M4: D L5: 5 M5: V Then put this formula in B1 =VLOOKUP(A1,L1:M4,2,FALSE) Keep changing the value in A1 to see it working Then see the Help file for more info. HTH Martin "jai" wrote in message ... I wanted to shorten this formula throw lookup function. Please help me on this. =If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
Long formula
I've added a bit of error handling:
=IF(A1<1,"",IF(A15,"",CHOOSE(A1,"a","b","C","D"," V"))) -- David Biddulph "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... =CHOOSE(A1,"a","b","C","D","V","") "jai" wrote in message ... I wanted to shorten this formula throw lookup function. Please help me on this. =If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
Long formula
Woops
Then put this formula in B1 =VLOOKUP(A1,L1:M4,2,FALSE) That should be =VLOOKUP(A1,L1:M5,2,FALSE) Regards Martin "MartinW" wrote in message ... Hi Jai, One way, Put your values in a table format out of the way somewhere. Say like this L1: 1 M1: a L2: 2 M2: b L3: 3 M3: C L4: 4 M4: D L5: 5 M5: V Then put this formula in B1 =VLOOKUP(A1,L1:M4,2,FALSE) Keep changing the value in A1 to see it working Then see the Help file for more info. HTH Martin "jai" wrote in message ... I wanted to shorten this formula throw lookup function. Please help me on this. =If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
Long formula
And another one just to show you some other options
=LOOKUP(A1,{1,2,3,4,5},{"a","b","C","D","V"}) HTH Martin "MartinW" wrote in message ... Woops Then put this formula in B1 =VLOOKUP(A1,L1:M4,2,FALSE) That should be =VLOOKUP(A1,L1:M5,2,FALSE) Regards Martin "MartinW" wrote in message ... Hi Jai, One way, Put your values in a table format out of the way somewhere. Say like this L1: 1 M1: a L2: 2 M2: b L3: 3 M3: C L4: 4 M4: D L5: 5 M5: V Then put this formula in B1 =VLOOKUP(A1,L1:M4,2,FALSE) Keep changing the value in A1 to see it working Then see the Help file for more info. HTH Martin "jai" wrote in message ... I wanted to shorten this formula throw lookup function. Please help me on this. =If(A1=1,"a",if(a1=2,"b",if(a1=3,"C",if(a1=4,"D",i f(a1=5,"V",""))))) Thanks & regards jai |
All times are GMT +1. The time now is 03:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com