INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

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

(OP)
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


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

Formula in D2: =IFERROR(VLOOKUP(B2,P$2:Q$17,2),"ERROR") and copy down.
Match to beginning of text in column B

combo

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

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

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

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close