Lookup - Improved vlookup

ryland00

Board Regular
Joined
Jun 13, 2014
Messages
76
Hello,

So I have been using the following code for situations where I am looking for a specific number string in a group of cells where I can't necessarily use a vlookup because the data is not consistent. (i.e. trying to find number string 034910294, but some cells might say "# 034910294", while others might say "number 034910294", and still others might say "here is number 034910294", etc..

=VLOOKUP(LOOKUP(REPT("z",255),CHOOSE({1,2},"ANOTHER VALUE",LOOKUP(1000,FIND(Key!$G$2:$G$29,$F4),Key!$G$2:$G$29))),Key!G:H,2,0)

This formula has been working wonderfully, however, I am wondering if there is any way to change it slightly so that the user is not limited to just the 28 items in the Key tab (referenced above). I don't trust that the users of my workbook will know that they will not only have to update column G in the 'Key' tab, but they will also need to change the formula each time an update is made from Key!$G$2:$G$29 to Key!$G$2:$G$30, or Key!$G$2:$G$31, etc.

I am not sure if something like this is possible, but I thought I would ask all of you excel geniuses.

Thanks!

Ryan
 
In case it makes it easier, the section I want the formula to review will always be the second segment :

10-5S6DB1-WD4-5555
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I think I've got it, unless you tell me differently. I removed the "-1" from the formula and it looks like it's working correctly..

If so, thanks so much for your help!!

The LEFT($F4,FIND("-",$F4,FIND("-",$F4)+1)-1) bit would deliver:

10-FINTRAIN

If you take out -1, we get:

10-FINTRAIN-

So, that's probably what you need to look at.
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

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