Lookup for Comma-separated values with numerical suffixes

100

New Member
Joined
Sep 22, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hi there, I was wondering if would be possible to use a cell with comma-separated values that have suffixes (i.e. iterations or repetitions) that in turn translate into the full value in the lookup table. The dataset we use is frankly ugly, but it would be nice if there was a way to make the process easier as at the moment, I have a formula that strips all the numbers from the data and then does an TEXTJOIN(IF(ISNUMBER(SEARCH())) resulting in the full values, but not the numerical suffixes.

DataDesired ResultValueFull Value
APP,BAN1Apple, BananaAPPApple
ORA1,ORA2Orange, Orange 2BANBanana
APP,ORA1,BAN2Apple, Orange, Banana 2ORAOrange

Values without a numerical suffix or a suffix of 1 have the same behavior, whilst values greater than 1 result in their suffixes being included at the end of their full value. I am unfortunately unable to use VBS in our workflow as our work is done using Office 365 on the Web.

I greatly appreciate the help!
 
How about
Excel Formula:
=LET(t,TEXTSPLIT(SUBSTITUTE(A2,"0",""),","),b,ISNUMBER(RIGHT(t)+0),TEXTJOIN(",",,VLOOKUP(LEFT(t,LEN(t)-b),$D$2:$E$5,2,0)&MID(t,LEN(t)+1-b,4)))
Thank you so much!! This is just what I wanted and works perfectly.
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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