Vlookup help for comma separated values

rik81h

New Member
Joined
Mar 29, 2024
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
Hi all,

New member here, relative novice in terms of excel usage.
I have a workbook i'm trying to put together with monthly worksheets containing date ranges. I have an extra worksheet with some data in, just 2 columns which contain a "job code" A-G with a description for each in the next column.

I want to be able to enter a code in the worksheets and it autofil the next column with the description. A friend helped me with this giving me a vlookup formula =IFERROR(VLOOKUP(B2,Descriptions!$A$2:$C$10,2,FALSE),"") however this does not work with multiple comma separated code values. I need to be able to enter A, C for example or maybe even 3 or more in to one cell.

Any help would be appreciated, TIA.
 
I don't have your version to test but what happens if you use this formula, entered normally?

rik81h.xlsm
AB
1
2ADescription A
3BDescription B
4CDescription C
5DDescription D
6EDescription E
7
8
Descriptions


Cell Formulas
RangeFormula
C29:C31C29=TEXTJOIN(", ",1,VLOOKUP(FILTERXML("<t><s>" & SUBSTITUTE(B29,",","</s><s>") & "</s></t>", "//s"),Descriptions!A$2:B$8,2,0))
Hi Peter, tried your solution and in a new workbook and again it is only returning the first entry. Does this seem like a problem with my version or setup? Thank you.
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
@KOKOSEK @Peter_SSs ok so it was my installation, after some updates and some faffing both of your formulas are working as i need them to. Thank you both very much for your time and effort.
 
Upvote 0
One follow up question, how do i make either of those formulas return a blank instead of #VALUE! for cells not populated? i have tried adding IF((ISERROR & IFERROR but with no luck
Nevermind resolved myself with IF(B6="","",{YOUR FORMULA}

Thanks
 
Last edited:
Upvote 0
Glad you got it resolved. Thanks for letting us know. (y)
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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