Compare two worksheets with "contains" and not "exact" values

F

Fuzzy

Dear experts!

I have two worksheets. Given examples below:

Excel 1

Column A
00123466799
126565897854
45457878451
45546544782
155467846564


Excel 2

Column A
1234667
65897854
57878451
46544782
67846564

I want to compare both the excels...... and give me result like a "vlookup"
function... however, in this case, the columns wont exactly match - but excel
1 "contains" the values of excel 2 in the same order - ignoring prefixes or
suffixes
 
J

Jacob Skaria

In Sheet2 B1 try the below formula and copy down which will lookup and get
the value from Sheet1

=IF(A1<>"",INDEX(Sheet1!A:A,MATCH("*" & A1 & "*",Sheet1!A:A,0)),"")

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top