#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 121
Default Long Formula

I got some help earlier with an IF Statement which was very helpful from Mike
H. The idea I am going for now is if I have the following ("Wireless
Laptop","Desktop Computer","Flatscreen Monitor","Server","Solar
Panels","I-Phone","I-Pod","Dual Screen Monitor Stand","Wirless Router") I
will get one of the following associated acronyms.
("JERA","SHJK","MCJM","MOPQ","ABPE","POMZ","PDAI", "COPN","HLMW"). In other
words the 1st item on the 1st list needs to match the 1st acroynm on the 2nd
list


Here is the original formula
=LOOKUP(B7,{"H","K","M","P"},{"JER","SHJ","MCJ","M OP"}) that Mike H helped me
with. I wanted to try chaning it around for a different use. Here is what I
have now =LOOKUP(D15,{"Wireless Laptop","Desktop Computer","Flatscreen
Monitor","Server","Solar Panels","I-Phone","I-Pod","Dual Screen Monitor
Stand","Wirless
Router"}{"JERA","SHJK","MCJM","MOPQ","ABPE","POMZ" ,"PDAI","COPN","HLMW"})
some of them work and some of them don't and I couldn't figure out why.
Any thoughts?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Long Formula

The first group, called the lookup_vector, *must* be sorted in ascending
order. However, with that many variables your best bet is to create a 2
column table with the item in the left column and the corresponding acroynm
in the right column. It isn't necessary that this table be sorted.

.....................A........................B
1.....Wireless Laptop..........JERA
2.....Desktop Computer.....SHJK
3.....Flatscreen Monitor......MCJM

Then you'd use a formula like this:

=VLOOKUP(D15,A1:B3,2,0)

--
Biff
Microsoft Excel MVP


"Workbook" wrote in message
...
I got some help earlier with an IF Statement which was very helpful from
Mike
H. The idea I am going for now is if I have the following ("Wireless
Laptop","Desktop Computer","Flatscreen Monitor","Server","Solar
Panels","I-Phone","I-Pod","Dual Screen Monitor Stand","Wirless Router") I
will get one of the following associated acronyms.
("JERA","SHJK","MCJM","MOPQ","ABPE","POMZ","PDAI", "COPN","HLMW"). In
other
words the 1st item on the 1st list needs to match the 1st acroynm on the
2nd
list


Here is the original formula
=LOOKUP(B7,{"H","K","M","P"},{"JER","SHJ","MCJ","M OP"}) that Mike H helped
me
with. I wanted to try chaning it around for a different use. Here is
what I
have now =LOOKUP(D15,{"Wireless Laptop","Desktop Computer","Flatscreen
Monitor","Server","Solar Panels","I-Phone","I-Pod","Dual Screen Monitor
Stand","Wirless
Router"}{"JERA","SHJK","MCJM","MOPQ","ABPE","POMZ" ,"PDAI","COPN","HLMW"})
some of them work and some of them don't and I couldn't figure out why.
Any thoughts?



  #3   Report Post  
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by Workbook View Post
I got some help earlier with an IF Statement which was very helpful from Mike
H. The idea I am going for now is if I have the following ("Wireless
Laptop","Desktop Computer","Flatscreen Monitor","Server","Solar
Panels","I-Phone","I-Pod","Dual Screen Monitor Stand","Wirless Router") I
will get one of the following associated acronyms.
("JERA","SHJK","MCJM","MOPQ","ABPE","POMZ","PDAI", "COPN","HLMW"). In other
words the 1st item on the 1st list needs to match the 1st acroynm on the 2nd
list


Here is the original formula
=LOOKUP(B7,{"H","K","M","P"},{"JER","SHJ","MCJ","M OP"}) that Mike H helped me
with. I wanted to try chaning it around for a different use. Here is what I
have now =LOOKUP(D15,{"Wireless Laptop","Desktop Computer","Flatscreen
Monitor","Server","Solar Panels","I-Phone","I-Pod","Dual Screen Monitor
Stand","Wirless
Router"}{"JERA","SHJK","MCJM","MOPQ","ABPE","POMZ" ,"PDAI","COPN","HLMW"})
some of them work and some of them don't and I couldn't figure out why.
Any thoughts?
Thanks for sharing long but useful formula..I was searching for it and finally got the code in this old thread
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 Gidders Excel Discussion (Misc queries) 3 June 12th 08 05:43 PM
Clearing cells takes long, long time unclemuffin Excel Discussion (Misc queries) 9 August 17th 07 02:22 AM
formula too long! phil2006 Excel Discussion (Misc queries) 8 July 2nd 06 11:34 PM
My formula is too long, What am I to do? Scott Excel Discussion (Misc queries) 2 December 14th 05 10:43 PM
Formula Too Long blacktour Excel Discussion (Misc queries) 2 August 24th 05 04:32 PM


All times are GMT +1. The time now is 03:16 AM.

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

About Us

"It's about Microsoft Excel"