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 derfloh 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 1

Status
Not open for further replies.

YANKRAY

Technical User
Nov 7, 2003
283
Using Excel 2007.

I have a column with text in the cells.
Each Cell has the string "REMOV", "INTALL", or "INSP" in it.
It could be the word REMOVE,REMOVAL, INSTALL, INSTALLATION, INSPECTION, INSP but the string is there somewhere.

How can I write a formula that finds one of the three string values and gives the result as "REMOVE", "INSTALL", or "INSPECT".

Thanks,
Ray
 
Assuming the data is in column A:
[tab][COLOR=blue white]=If(IsNumber(Search("REMOV", A2)), "Remove", If(IsNumber(Search("INSTAL", A2)), "Install", If(IsNumber(Search("INSP", A2)), "Inspect", 0)))[/color]

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
John,

Thank you very much. This is exactly what I needed.

Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top