VB Code for Relative Lookup

ATY807

New Member
Joined
Mar 18, 2020
Messages
12
Office Version
  1. 2013
Platform
  1. Windows
Hello,

I initially posted this on an existing thread (https://www.mrexcel.com/board/threa...ence-within-a-text-string.892622/post-5878927), but was advised that my question differs from the original.

I have a list of file names (10 digit numbers) to look up against a list where these file names are embedded within a text. I was hoping to use VLOOKUP with TRUE as an argument to do relative referencing , but it didn't work. Is anyone able to provide a vb code for this lookup problem so that when the file number exists anywhere in the first column of the table array, it returns the file status, and returns blank or "NA" when it doesn't exist. I have attached a snapshot which shows the look up value and return value (which is what I need) on the left, and the lookup table on the right. Are you able to provide me with a vb code for this?

Relative referencing.PNG



Thank you in advance


EDIT:
Left showing File Name (Lookup value), Return value (status) is on the right table. File numbers are embedded within text on the right table. used =VLOOKUP(A1, TABLE1,2,TRUE), but didn't work; returned #N/A for all loans whereas those numbers do exist on the right table.
 
Last edited by a moderator:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,215,507
Messages
6,125,212
Members
449,214
Latest member
mr_ordinaryboy

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