ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vlookup and finding text string that's not an exact match (https://www.excelbanter.com/excel-discussion-misc-queries/151091-vlookup-finding-text-string-thats-not-exact-match.html)

my

vlookup and finding text string that's not an exact match
 
Hi there-

I'm trying to do a vlookup and trying to find a text string that is not an
exact match.

For example, my current formula is:
=VLOOKUP("laptop*", $B:$C,2,FALSE)

and if it matches any text with "laptop", e.g. "Sony laptop" in it, it
returns the second column corresponding cell.

Also, intead of writing out the text "laptop" I want to reference a cell
where the text is. So I want to do something like:

=VLOOKUP(D1*, $B:$C,2,FALSE)

But I get an error warning. Can anyone shed some light?

Thanks!

Elkar

vlookup and finding text string that's not an exact match
 
Try this:

=VLOOKUP("*"&D1&"*",$B:$C,2,FALSE)

HTH,
Elkar


"my" wrote:

Hi there-

I'm trying to do a vlookup and trying to find a text string that is not an
exact match.

For example, my current formula is:
=VLOOKUP("laptop*", $B:$C,2,FALSE)

and if it matches any text with "laptop", e.g. "Sony laptop" in it, it
returns the second column corresponding cell.

Also, intead of writing out the text "laptop" I want to reference a cell
where the text is. So I want to do something like:

=VLOOKUP(D1*, $B:$C,2,FALSE)

But I get an error warning. Can anyone shed some light?

Thanks!


my

vlookup and finding text string that's not an exact match
 
It works and kind of not works... If the text I'm looking up is something
like "laptop 2.0", it doesn't work if the range I'm looking in has "Sony
laptop 2.1", does it?

"Elkar" wrote:

Try this:

=VLOOKUP("*"&D1&"*",$B:$C,2,FALSE)

HTH,
Elkar


"my" wrote:

Hi there-

I'm trying to do a vlookup and trying to find a text string that is not an
exact match.

For example, my current formula is:
=VLOOKUP("laptop*", $B:$C,2,FALSE)

and if it matches any text with "laptop", e.g. "Sony laptop" in it, it
returns the second column corresponding cell.

Also, intead of writing out the text "laptop" I want to reference a cell
where the text is. So I want to do something like:

=VLOOKUP(D1*, $B:$C,2,FALSE)

But I get an error warning. Can anyone shed some light?

Thanks!


Elkar

vlookup and finding text string that's not an exact match
 
No, that wouldn't work. But, rather than trying to alter the formula, maybe
you should just be less specific in your search criteria. For example, if
you want "Sony Laptop 2.1" to be a match, try searching for "Laptop 2."
instead.

HTH,
Elkar


"my" wrote:

It works and kind of not works... If the text I'm looking up is something
like "laptop 2.0", it doesn't work if the range I'm looking in has "Sony
laptop 2.1", does it?

"Elkar" wrote:

Try this:

=VLOOKUP("*"&D1&"*",$B:$C,2,FALSE)

HTH,
Elkar


"my" wrote:

Hi there-

I'm trying to do a vlookup and trying to find a text string that is not an
exact match.

For example, my current formula is:
=VLOOKUP("laptop*", $B:$C,2,FALSE)

and if it matches any text with "laptop", e.g. "Sony laptop" in it, it
returns the second column corresponding cell.

Also, intead of writing out the text "laptop" I want to reference a cell
where the text is. So I want to do something like:

=VLOOKUP(D1*, $B:$C,2,FALSE)

But I get an error warning. Can anyone shed some light?

Thanks!


[email protected]

vlookup and finding text string that's not an exact match
 
On Jul 20, 7:54 pm, Elkar wrote:
No, that wouldn't work. But, rather than trying to alter the formula, maybe
you should just be less specific in your search criteria. For example, if
you want "Sony Laptop 2.1" to be a match, try searching for "Laptop 2."
instead.

HTH,
Elkar



"my" wrote:
It works and kind of not works... If the text I'm looking up is something
like "laptop 2.0", it doesn't work if the range I'm looking in has "Sony
laptop 2.1", does it?


"Elkar" wrote:


Try this:


=VLOOKUP("*"&D1&"*",$B:$C,2,FALSE)


HTH,
Elkar


"my" wrote:


Hi there-


I'm trying to do a vlookup and trying to find a text string that is not an
exact match.


For example, my current formula is:
=VLOOKUP("laptop*", $B:$C,2,FALSE)


and if it matches any text with "laptop", e.g. "Sony laptop" in it, it
returns the second column corresponding cell.


Also, intead of writing out the text "laptop" I want to reference a cell
where the text is. So I want to do something like:


=VLOOKUP(D1*, $B:$C,2,FALSE)


But I get an error warning. Can anyone shed some light?


Thanks!- Hide quoted text -


- Show quoted text -


Super tip - Thanks!



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com