How to lookup the comma separated data in one cell and return values in another single cell

Harry Geda

Board Regular
Joined
Mar 4, 2010
Messages
153
Hello,

I enter bunch of serial numbers into one cell. 123, 224, 139, 124
There is a table with corresponding numbers. Like 123 = AKM
124=KLM 139=CSA & 244=LMN (please do not try to solve this. They are random letters for example :) )
the answer should come back as AKM, LMN, CSA, KLM in one cell.
A B
---- -----
123 AKM
124 KLM
.
.
139 CSA
.
.
244 LMN

Lets say they are from A1 to B300
The Serial numbers are entered in D1 and I like to get answers in E1.
example D1 [ 123, 139 ] answer in E1 [AKM, CSA]

I would like to do this with equation instead of VBA if possible.

Thank you,
Harry
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hello Robert,
The maximum number of entries will not exceed 20 per cell.

Thank you for looking into this.
Harry
 
Upvote 0
53616546.jpg

I hope you are using X07 or 10( if not please let me know)

A1: your data

A4:=", "&A1&","

A5:=IFERROR(MID(SUBSTITUTE(SUBSTITUTE($A$4,", ","&",ROW(A1)),",","%",ROW(A1)),FIND("&",SUBSTITUTE($A$4,", ","&",ROW(A1)))+1,FIND("%",SUBSTITUTE(SUBSTITUTE($A$4,", ","&",ROW(A1)),",","%",ROW(A1)))-1-FIND("&",SUBSTITUTE($A$4,", ","&",ROW(A1)))),"")

copy down

B5:=IF(A5="","",VLOOKUP(A5,$D$1:$E$5,2,0))

copy down
 
Upvote 0
Hello Robert,

I am confused with the solution.
Which one is my data source?
AB column pair or DE pair?

The source cell as you wrote: 123,227884, 137779, 124, 3455544
The resulting cell should read: kkk, ddd, sss, www, ggg
I did not find the resulting cell in your example.

Please advise,
Harry
 
Last edited:
Upvote 0
Robert,

Thank you for working with me.
I am not allowed to install programs.

Thanks for working on this.
Bye,
Harry
 
Upvote 0
On second thought:
In C5 copy dow:
=IF(B5="","",", ")
In A2:
=TRIM(CONCATENATE(B5,C5,B6,C6,B7,C7,B8,C8,B9,C9,B10,C10,B11,C11,B12,C12))
you will need to adjust the CONCATENATE formula to all cells in your examples.

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top