简体   繁体   中英

Alternative to vlookup with index and match in excel

Cell A1: 0553400710 
Cell A2: John
Cell B1: ['0553400710', '0553439406']

Note:

  1. Cell B1 has a fixed format of ['number','number,'number',...... ]
  2. A1 and A2 are user input values
  3. I want to match 0553400710 in Cell A1 with ['0553400710', '0553439406'] in Cell B1.

If it matches, I want to return A2: John.

Is it possible?

I have asked the question before here . it has all the pictures attached as well. Unfortunately no one except one could solve it.

The one who gave me a nearest answer was Jeeped whose answer is

=IFERROR(INDEX(A:A, MATCH("*"&A1&"*",B:B, 0)+1), "")

The problem with this is that it takes the column array instead of rows array. I need it to be in rows as its the best practice for a database. Is there anyone who can improve this solution?

I have also tried vlookup as below but it failed

在此处输入图片说明

Here is the data for reference 在此处输入图片说明

and here is the input i am trying to match

在此处输入图片说明

Is it possible?

=IF(ISNUMBER(SEARCH(A1,B1)),A2,"number not found")

This will work for your example at the top. If A1 looks like ['0553400710'] you could try using SUBSTITUTE formula to remove punctuation.

Not sure what you were trying to do in the bottom bit, sorry.

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