简体   繁体   中英

Vlookup partial string match (with wild card) doesn't work

I'm trying to do a Vlookup partial match. My Column looks like this

Code               Price
24510250600          100
24510260101          20
24510260102          98
24510260201          22
24510260202          10

I'm given the a partial string of the Code and want to find the Price.

Code               Price
102506

My current Vlookup is

=VLOOKUP("*"&E11&"*",E2:H7,2,FALSE)

This should search 102506 and match with 24510250600 then return the price from the table but I am getting #N/A. Please advise as I don't know why the wild card function doesn't work. Thanks.

the issue is that "*"&E11&"*" is a text string and one cannot use VLOOKUP to lookup text in numbers.

If one has the Dynamic Array formula FILTER

=@FILTER(B2:B6,ISNUMBER(SEARCH(E2,A2:A6)))

在此处输入图片说明


If not then use:

=INDEX(B:B,AGGREGATE(15,7,ROW($A$2:$A$6)/(ISNUMBER(SEARCH(E2,$A$2:$A$6))),1))

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM