Possible VLookup Partial String

I couldn't quite find something on the net to modify that will work. I have used Lookup before but now I believe I need to use VLookup or a combination of formulas to achieve this task.

In Sheet1 I want a formula to search P901 (or 901, whatever is easier) in Sheet2 range $A$2:$A$501 and then output the cell in the next column B.

The range of cells that we will search will have string of text that look like these: G10L85P500 all the way to G10L85P999. The lookup or search will only find one.

Thanks,

Bob

June 8th, 2015 2:06pm

Hello Bob:

From your post, it looks like you want to use formulas and not VBA... correct?

Free Windows Admin Tool Kit Click here and download it now
June 8th, 2015 2:29pm

Yes. I'm a novice at excel and even more at VBA.
June 8th, 2015 3:20pm

Bob:

I will have to defer this issue to another expert.  My specialty is VBA, and especially VLookups using VBA because I even wrote a book on the subject :)

Power Up Using Excel VBA Sorts and Searches

Regards,

Free Windows Admin Tool Kit Click here and download it now
June 8th, 2015 4:19pm

Hi

Try this:

=IF(B2="","",VLOOKUP("*"&B2,Sheet2!A2:B102,2,FALSE))

Change B2 in the formula in sheet1 for looking up say 905  or P905 and place the formula in any cell on Sheet1.

HTH

June 8th, 2015 6:48pm

Hi

This is the forum to discuss questions about Microsoft Excel develop (VBA). For you are intend to use formula, I will move the thread to the TechNet forum for Excel.

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

Thank you for your understanding.

Best Regards,

Lan

Free Windows Admin Tool Kit Click here and download it now
June 8th, 2015 10:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics