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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,091
Latest member
gaurav_7829

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