Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

looking for a string match within larger string

Status
Not open for further replies.

pedro404

Programmer
Feb 17, 2004
11
DE
hi
im linking filenames which has been saved in a excel sheet
to other documents whose filenames contain the first filename (minus the extension)
i need to figure out how to compare a short string with a longer one which contains the 1st string somewhere within it, but the location within the larger string will differ according to the naming conventions being used.
ie. "bill0402" and "teresa_floodbill0402.doc"
any suggestions much appreciated

pedro404
 
use the instr() function, which will return the place where the string commences. If the string is not found, it will return 0

myplace= instr(mystring, tofind, positionToStart)

BB

Please try to search for answers before you post a new question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top