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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract partial string data

Status
Not open for further replies.

YANKRAY

Technical User
Nov 7, 2003
283
thread767-1415394

CR 10

Is there a way to perform this for multiple requests?

For Example, I want to pull the "CHANG FROM WO" part of the string and also variations of how this could be written like "CHANGE FROM WO" or CHG FROM WO".

I would like to do all the checks in one formula.

Thanks,
Ray


if InstrRev ({table.comment}, "CHG FROM WO") = 0 then
""
else
Mid({table.comment}, InstrRev({table.comment}, "CHG FROM WO"), 24)

 
Why not just ignore the change part, and check for "FROM WO":

if Instr ({table.comment}, "FROM WO") = 0 then
"" else
"Change From WO" +
Mid({table.comment}, Instr({table.comment}, "FROM WO")+2)

This assumes that the code you want is always at the end of the string.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top