Extracting/transposing data from a delimited text string

nyconfidential

New Member
Joined
Jul 22, 2015
Messages
49
Office Version
  1. 365
  2. 2016
Hi all - I have a delimited string of numbers/letters in one cell that I am trying to transpose into another set of cells(the string could be something like "A, B, 179, C")

Normally I would just use the split function in VBA, break this into an array and assign each cell I want to insert into the array index value, but I am not allowed to do this in case(has to be done via formula, no code).

So, is there is a simple way to take a string like ""A, B, 179, C" and assign each value to a cell via a formula? This is what I want the cells to look like:

A1 - "A"
A2 - "B"
A3 - "179"
A4 - "C"

Thanks!
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hey,

If each part is separated by a comma then assuming the string is in cell A1:

A2:
Code:
TRIM(MID(SUBSTITUTE($A$1,CHAR(44),REPT(" ",LEN($A$1))),(ROW()-2)*LEN($A$1)+1,LEN($A$1)))

Drag this down the A column to uncover the string in all of its glory!
 
Upvote 0
No problem!!

Also, if the delimiter was to change then all you have to edit would be the CHAR(44) (which is a comma) to whatever the new delimiter is, e.g. CHAR(59) (semi-colon), so it's quite flexible.
Or you could put the delimiter in to B1 and reference that instead of using CHAR function.

Glad I could help :-)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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