Lookup Function??

Brucea

New Member
Joined
May 25, 2007
Messages
40
Am I doing something wrong? I am using the lookup function to determine some text in a cell. Some of the values come back correctly and others do not. Some times I also get a #N/A result.
What I was hoping for was if the cell (B6) has a particular word in it, then the cell this formula is in would show the abreviated name. I could use a number of nested IF formulas or some VB code but this seems more straight forward.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
The lookup function requires the range be ordered from lowest to highest or the other way around, anyway its not a great one to be using.

Other functions are better such as VLOOKUP, or combining MATCH & INDEX.

If you want to post an example I'll have a look for ya.

Mosiki
 
Upvote 0
Sorry ,I meant to copy the formula into the message I have put the complete post in below. Thanks

Am I doing something wrong? I am using the lookup function to determine some text in a cell. Some of the values come back correctly and others do not. Sometimes I also get a #N/A result.
What I was hoping for was if the cell (B6) has a particular word in it, then the cell this formula is in would show the abbreviated name. I could use a number of nested IF formulas or some VB code but this seems more straight forward.
Here is the formula I am using:
=LOOKUP(B7,{"Ceramic Tile","Cork","Wood","Area Rugs","Laminates","Carpet"},{"CT","CK ","WD ","AR","LM ","Car"})
 
Upvote 0
Hello,

try

=LOOKUP(B7,{"Area Rugs","Carpet","Ceramic Tile","Cork","Laminates","Wood"},{"AR","Car","CT","CK ","LM ","WD "})

they do need to be in order.
 
Upvote 0
If I understand correctly, wherever you find words such as Ceramic Tile, Cork, Wood, etc you would like the cell next to it to show CT, CK, WD ??

If this is the case why not do a simple key table.

eg. A1 = Ceramic Tile A2= CT
B1 = Cork B2= CK
C1 = Wood C2 = WD.....etc


If cell B6 is "Ceramic Tile" in cell B7 put =VLOOKUP(B6,$A$1:$C$2,2,false)

Mosiki
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,257
Members
448,880
Latest member
aveternik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top