Link to home
Start Free TrialLog in
Avatar of Nirvana
NirvanaFlag for India

asked on

vlookup from part of the text (filename)

how can do i vlookup based in specific text for example if i find "accord" in the below path it have to pick contents from column 2

C:\Users\123\Desktop\AHK\accord 5555.pdf

attached is the file with example
send-mac.xlsm
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

try formula:
=IF( ISNUMBER(SEARCH("accord",F2)),B2, "")

Open in new window

send-mac_b.xlsm
The table isn't in the correct format to use VLOOKUP, so you'll have to use INDEX/MATCH and wildcards...

=INDEX(Sheet2!B:B, MATCH("*"&A2&"*", Sheet2!F:F, 0))

If there are multiple instances it will only return the first.
Avatar of Nirvana

ASKER

hi wayne, the formula is giving an error as #N/A i have tried changing the formula to =INDEX(Sheet2!B:B, MATCH(Master!"*"&A2&"*", Sheet2!F:F, 0)). still not working
#N/A indicates it wasn't found. Are you using it in your example workbook, or another one?
Avatar of Nirvana

ASKER

basically what i i am looking for is I have hundreds of pdf files which contains customer name i have to send those files as an attachment to respective customers.with standard subject and body
Avatar of Nirvana

ASKER

@Wayne, thank you and sorry was using formula in sheeet to rather Master thanks it worked,how can include ; for each id?
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nirvana

ASKER

Thank you it worked perfect