Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 217
Default Vlookup "contains"

i'm trying to write a vlookup that will advise me when a traveller has
visited an airport in belgium..

e.g. the cell will contain something like LHR/CDG/ODL or ODL/LGW/SEA

Basically in the example above I want it to show me when the cell contains
ODL (or another Belgium airport code which i have a list of, hence the
vlookup).

Can this be done, so far I have the following...

=IF(ISERROR(VLOOKUP(C2,'Belgium Codes'!C1:C15,1,0)),"","Belgium")

but this only returns when the cell purely contains "ODL"..

Can anyone help me please?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default Vlookup "contains"

Hi Louise

One way would be to use an array formula like the following in cell B1
{=ISNUMBER(FIND(E$1:E$10,A1))}

where E1:E10 contains your list of airports, and column A contains your
string to be searched
Copy down column B for the extent of your list in column A

Array formulae must be committed or Edited using Ctrl+Shift+Enter (CSE)
not just Enter.
When you use CSE, Excel will create the curly braces { } for you.
Do not type them yourself.

--
Regards

Roger Govier


"Louise" wrote in message
...
i'm trying to write a vlookup that will advise me when a traveller has
visited an airport in belgium..

e.g. the cell will contain something like LHR/CDG/ODL or ODL/LGW/SEA

Basically in the example above I want it to show me when the cell
contains
ODL (or another Belgium airport code which i have a list of, hence the
vlookup).

Can this be done, so far I have the following...

=IF(ISERROR(VLOOKUP(C2,'Belgium Codes'!C1:C15,1,0)),"","Belgium")

but this only returns when the cell purely contains "ODL"..

Can anyone help me please?

Thanks,



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
correct syntax for nesting "if", "and", and "vlookup"....if possib Christine Excel Worksheet Functions 4 January 2nd 09 10:43 PM
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 Milky Excel Worksheet Functions 1 August 20th 08 08:38 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE") Souris Excel Programming 2 August 17th 05 05:33 AM
Problem with "On error resume next" with "custom VLookup" Factivator Excel Programming 3 July 20th 04 04:42 PM


All times are GMT +1. The time now is 02:39 PM.

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"