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

EXCEL 2016 - NOMINATE SEARCH LIST & CORRESPONDING CODES - RETURN CODE IF SEARCH FOUND IN TEXT ST

Status
Not open for further replies.

Megs628

Technical User
Sep 7, 2015
12
AU
Afternoon

Using Excel 2016.

I have a list of data - refer to attached s/sheet - I wish to search for nominated strings within text and if found return the nominated code for this text.

I would move the NAME_SEARCH & CODES to a separate sheet and also input named ranges but for the purposes of this issue I've left the column / row identifiers.

E.G.

Using column strings nominated in NAME_SEARCH column (P3:p17), search NARRATIVE column (B2:B59), if a match is found then return the corresponding CODE (Q2:Q17) for each string.
If none found then simply error.


My attempted formula is in column D. I'm not sure what is wrong. I have tried it both with COLUMN & ROW formula.

Thanks very much for your help


 
 http://files.engineering.com/getfile.aspx?folder=bf017454-f6e2-4ed3-b5c5-d6dde5120ffd&file=TEK_TIPS_SAMPLE_SET.xlsx
Formula in D2: =IFERROR(VLOOKUP(B2,P$2:Q$17,2),"ERROR") and copy down.
Match to beginning of text in column B

combo
 
Sorry, the solution above is not exact enough, you may need exact match in VLOOKUP instead, for this truncate text in column P to five characters (shortest HAIGH) and add helper column to extract left five characters from col. B.

combo
 
Thanks - good suggestion.

I was using the search function as the text maybe anywhere in the search narrative. It cant be guaranteed that it will always be the first x number of characters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top