Closest Match Formula

bflan0524

Board Regular
Joined
Oct 7, 2016
Messages
192
Office Version
  1. 2010
hello i am trying to formula to identify if a value is in both columns, the entries are in text format for example below
so in the below i would have a column C where i did a lookup of the value in column B compared to column A and it would return the value in column A, does that make sense? right now if i did a normal lookup it would come back #NA because column A does not match column B exactly
Column AColumn B
John Doe IncJohn Doe
 
Arrgh, I didn't see that the case doesn't match and there will be blank cells. Please test with below tweak.
=LOOKUP(2^15,SEARCH(A:A,B3,1)/LEN(A:A),A:A)
Note: These formulas will be quite taxing on the worksheet. See if you can limit to specific ranges on your sheet!
thanks again, so you can stop any time you like but now it worked for the example above but now column A=DEPENDABLE CLEANERS INC and column B=DEPENDABLE CLEANERS but it doesnt return a match.
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Arrgh, I didn't see that the case doesn't match and there will be blank cells. Please test with below tweak.
=LOOKUP(2^15,SEARCH(A:A,B3,1)/LEN(A:A),A:A)
Note: These formulas will be quite taxing on the worksheet. See if you can limit to specific ranges on your sheet!
feel free to quit anytime, and that did work but still has issues. for example column A=DEPENDABLE CLEANERS INC where column B=DEPENDABLE CLEANERS but column C didnt return anything

ty again for all your help
 
Upvote 0
whoops didnt see my previous one posted, sorry
With your data which is all mixed up I am getting feeling that you should be better off using below construct:
=IFERROR(LOOKUP(2^15,SEARCH(B1,A:A,1),A:A),LOOKUP(2^15,SEARCH(A:A,B1,1)/LEN(A:A),A:A))
 
Upvote 0
=Index(A:B;MATCH("*"&B1&"*";A:A;0);1) should work whatever the sorting, blank cells and capital/small letters. You can just put a Iferror or IfNA for the case it does not exist.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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