Lookup match from other sheet

Bstacks

New Member
Joined
Oct 21, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all, could use some help with this one. I've been working on it with the help of copilot to no avail. I will do my best to explain what I am after.

Sheet1 has a column called "Number" (which can be alpha numeric)
Sheet2 has a product name called "Name" which can contain the number.

I need to do a lookup from the "Number" column and confirm if any product from Sheet2 contains that number. Then I also need to know how many products contain that number.

For example in the screenshot below I don't want a match of 7004 to 7004EG
1729541145013.png
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Are the numbers in the product always surrounded by hyphens? or coulkd be there also "7004EG-New-Flange" or "Fiiting-something-7004EG"

If there are always hyphens both before and after look for "-" & number & "-" instead of just number

PS. Saying that they are in column named Number or Name - are you saying that they in excel tables (with headers) - what are table names then? Or it is just Column X in one sheet and column Y on second sheet and the name is just mentioned in cell in first row
 
Upvote 0
Hi Kaper,
Unfortunately not, the numbers are sometimes in the beginning, end, sometimes surrounded by hyphens, sometimes not.
The table name that contains the numbers I use as a reference is called "RFA_TXT_FILES" and I need to search for that information in a table called "ITMs"
 
Upvote 0
My idea would be to sort numbers list descending (this way 7004EG will be before 7004 and 7001-2 before 7001)
Then search names starting from the first number, but after finding a match, removing all fitting names from the list of items to be searched for next number.

I don't think it is easy to do with formulas, but probably VBA code would do the work reasonably quickly. Is a macro solution OK for you?

As for formulas - probably it could be implemented that way that first a list of all fitting numbers for given name is created, then sorting of such list descending, finally keep only the first one.

And as I understand the data is in excel tables.
To test if that's true - does formula:
Excel Formula:
=COUNTA(RFA_TXT_FILES[Number])
work and returns a number of numbers as well as
Excel Formula:
=COUNTA(ITMs[Name])

a number of names?
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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