Multiple data values in single field

jimbomcmucka

New Member
Joined
Oct 11, 2022
Messages
26
Office Version
  1. 365
Platform
  1. Windows
Hi guys,
I have been racking my brain and cannot think of a way to work this problem - I'm hoping you may be able to point me in the right direction!?!

I am working on a project where we are changing a system and I need to transfer all of the data from the legacy to the new system, using a series of export / import sheets. The systems use 2 different 'languages', so I need to export the data from the legacy, cleanse the data and 'translate it' before uploading. Most of the fields have been fine, using either concatenations, substitutes etc. But a few of the fields hold multiple values, separated using a pipe (|). For example the extract would read "Product A | Product B | Product C".

I am running a VLOOKUP from the old product name to the new product name, based on a table in another tab (find old value, return new value) - which is working fine for singular values.

So, my question is - Is there a function that I can use that will consider the fact the field contains multiple values. Essentially, in my example above, I want to run 3 lookups, return 3 results, each separated with a pipe. (Note: The column could have any number of values, max approx 25.)

Hoping that makes sense? I'm not really sure where to start with further info, but do fire any questions at me that will help clarify!

Thanks!
Jim
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Something along these lines:

Excel Formula:
=TEXTJOIN(" | ",,VLOOKUP(TEXTSPLIT(A1," | "),B1:C3,2,1))
 
Upvote 0
Solution
Something along these lines:

Excel Formula:
=TEXTJOIN(" | ",,VLOOKUP(TEXTSPLIT(A1," | "),B1:C3,2,1))
Thanks very much! I'll give this a try.

I've never come across the TEXTJOIN and TEXTSPLIT functions before! - these could be really useful.
 
Upvote 0
Thanks very much! I'll give this a try.

I've never come across the TEXTJOIN and TEXTSPLIT functions before! - these could be really useful.
I made a crucial mistake though, the last parameter of VLOOKUP should read '0' for exact matching and not '1'! Make sure to adjust this before usage.
 
Upvote 0
That's amazing - It worked perfectly! Thanks so much.

Man, I wish I had come here sooner - would have saved me a few hours!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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