Lookup Multiple values in a single cell and return corresponding value in another sheet

yashballari

New Member
Joined
Apr 12, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Task.PNG


I would like to populate the ORDER ID value in Sheet 2 using the Asset tag and look up for the Asset tag in Sheet 1 and its corresponding ORDER ID in sheet.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the Board!

You can use a VLOOKUP formula with wildcards.
Here is a simple example.

Data on Sheet1:
1712924143564.png


Data and results on Sheet2:
1712924180572.png


Formula in cell B2 on Sheet2 (and copy down for all rows):
Excel Formula:
=VLOOKUP("*"&A2&"*",Sheet1!A$2:B$4,2,0)
 
Upvote 0
Hello Joe,

Thank you so much for the workaround.

However, I am unable to the results are not displaying all the data.

Some Asset tags, though they are available in the data sheet but they do not show the corresponding order ID.

Why do you think? Is it because multiple Asset tags have same Order ID ?
 
Upvote 0
Hello Joe,

Thank you so much for the workaround.

However, I am unable to the results are not displaying all the data.

Some Asset tags, though they are available in the data sheet but they do not show the corresponding order ID.

Why do you think? Is it because multiple Asset tags have same Order ID ?
No, that shouldn't be an issue. The example has multiple values in it and you can see it returning the correct values.
Just note that VLOOKUP will return the FIRST instance it finds. So if there are multiple lines that match, it will only show the first one.

If there is an issue of one not showing up at all, please show an actual example of that, so we can see it.
And make sure that there aren't any extra spaces or characters at the end of the Asset tag values on sheet 2. That could cause issues.
 
Upvote 0
Hi!
I have a follow up question on your proposed formula above, @Joe4. I have a similar scenario. It works fine with cells that hold multiple values. So, thanks a lot. However, in the column A, Asset Tag, I also have cells with only one value, for example:"XYZ123", only. When I run the formula against a single value cell, I get a:"#N/A"-error.
Any suggestion as to how to get around that?
Thank you very much in advance.
 
Upvote 0
Hi!
I have a follow up question on your proposed formula above, @Joe4. I have a similar scenario. It works fine with cells that hold multiple values. So, thanks a lot. However, in the column A, Asset Tag, I also have cells with only one value, for example:"XYZ123", only. When I run the formula against a single value cell, I get a:"#N/A"-error.
Any suggestion as to how to get around that?
Thank you very much in advance.
I cannot reproduce your example. Here is my example of the situation you describe:

Sheet1:
1719920062166.png


Sheet2:
1719920099976.png


Formula in cell B2 on Sheet2 copied down:
Excel Formula:
=VLOOKUP("*"&A2&"*",Sheet1!A$2:B$5,2,0)

If you are getting #N/A (which indicates no match), it probably indicates either a data issue (they really are not equal), or an issue with your formula (you did not write it correctly).

If you cannot figure it out, please post your example that is not working (like I did above), and show us your formula.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top