#1   Report Post  
Posted to microsoft.public.excel.misc
jai jai is offline
external usenet poster
 
Posts: 71
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default 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





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default 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







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula too long manman Excel Worksheet Functions 1 September 6th 07 04:20 AM
Clearing cells takes long, long time unclemuffin Excel Discussion (Misc queries) 9 August 17th 07 02:22 AM
Formula is too long jai Excel Discussion (Misc queries) 2 June 6th 07 01:33 PM
formula too long? [email protected] Excel Worksheet Functions 2 November 27th 06 03:56 PM
formula too long cencoit Excel Worksheet Functions 3 September 22nd 05 02:26 AM


All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"