Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Look up beyond VLOOKUP

I need to look up for a value in a range of cells; the problem is that that
value is going to be part of the value/text (not an exact match) of any cell
in that range. Thus VLOOKUP alone wont work.
i.e
looking for
120206
in a range of cells where one of them contains
120203, 120206, 120201, 120196, 120202, 120208

thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Look up beyond VLOOKUP

Luis,

For example, to pull a value from column C where the string 120206 is in a cell in column A:

=INDEX(C:C,MATCH("*120206*",A:A,FALSE))

The values in column A must be strings - ie, if you entere 120206 into a cell in column A, it should
not be a number.. otherwise, you will need to look for the number first.

HTH,
Bernie
MS Excel MVP


"LuisE" wrote in message
...
I need to look up for a value in a range of cells; the problem is that that
value is going to be part of the value/text (not an exact match) of any cell
in that range. Thus VLOOKUP alone won't work.
i.e
looking for
120206
in a range of cells where one of them contains
120203, 120206, 120201, 120196, 120202, 120208

thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Look up beyond VLOOKUP

You can use wild cards.

=vlookup("*" & "120206" & "*", sheet2!a:b, 2, false)
or
=vlookup("*" & A1 & "*", sheet2!a:b, 2, false)

and probably better:

=if(a1="","",vlookup("*" & A1 & "*", sheet2!a:b, 2, false))

Those wildcards will find a match!

LuisE wrote:

I need to look up for a value in a range of cells; the problem is that that
value is going to be part of the value/text (not an exact match) of any cell
in that range. Thus VLOOKUP alone wont work.
i.e
looking for
120206
in a range of cells where one of them contains
120203, 120206, 120201, 120196, 120202, 120208

thanks in advance


--

Dave Peterson
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
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 07:33 PM
Vlookup problem - unable to get the vlookup property Fred Excel Programming 2 August 22nd 08 05:23 PM
using a vlookup to enter text into rows beneath the vlookup cell Roger on Excel Excel Programming 1 November 29th 07 12:09 PM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 11:26 PM.

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"