Help with Excel please [Solved/Closed]

Report
-
 Bob -
Hi
I have an excel spreadsheet with two columns in A is a list of codes, and in B a list of names containing the codes in a string

A B
123 ABC124
122 DEC123
124 SDE122

I would like to Search B for the code in A and output the resulting string into Column C

Any ideas are appreciated

4 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
763
You can use vlookup or match etc
Thanks for the reply, unfortunately the post does not reflect the issue as I had hoped, I have tried :

=IF (ISNS(Vlookup(A1{cell with the string to look for}, Table {a single Column with the strings to search in},1{Single Column}, False)), "", Vlookup(A1, Table,false))

This usually helps, but how can I set it to search a specific string and not a match from the table?

Again I appreciate the help.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
763
I think for that you would need to use a combination of match and indirect. Match would give you the row number and then you can use indirect to get the value

=IF(ISERROR(MATCH("*" & A1 & "*", Sheet2!B:B,0)), "", INDIRECT("Sheet2!B" & MATCH("*" & A1 & "*", Sheet2!B:B,0))

I have not tested it, but I am sure you can make it work
Thank you very much rizvisa1 I have been seaching for ages your help is much appreciated

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!