Split multiple column using delimiter

Hi how would i acheive this

I have a table which has 2 columns, both with delimiters.

I need to split the columns into rows using the delimiters, but maintain the matching sequence between the 2 columns.

For example:

Original table

Col1 Col2

a,b,c x,y,z

I want the new table to be
|a|x|
|b|y|
|c|z|

Hey Antony,

Copy and paste this snippet into a flow to get started.

parabola:cb:47ed9ba4189941818c5d6db44edca605

It’s a tricky problem that took more steps than I’d like, but it should work for you.

This toggle explains how the flow works, if you're interested.

Essentially, this snippet takes a CSV with two columns, as you described, and splits the values into two separate tables, one for each column. Then it splits the “a,b,c” values into three separate columns. Then we can flip the tables on their side so we have

|Col. 1|
|a|
|b|
|c|

We do these steps for both columns.

and then we just stitch the two separate tables back into one, using a Combine Tables step.

Does this work for what you need?

1 Like

You are legendary, that should work, i wonder if there was a unique id for each row, would we follow the same step

1 Like

Thanks Antony, glad it works for you.

What do you mean a unique ID for each row?

The final steps give a dummy row number and combine the tables based on that value. So if you had real row IDs or something like that, you could use those as the key value to combining your tables.

hi thanks for your response, i was using an airtable base, so i could utilise the airtable unique row id instead of adding a new row number

1 Like

i should probably have mentioned this first, then the steps would have been more compact

1 Like

Hi there, i am still a bit confused, i am trying to achieve this for the following format of data, i have a class id unique column

Class ID - Rotation Day Number - Rotation Period Number

DP1-Math - 1,3,5,6 - 2,4,1,3
DP1-Science - 3,4,5,8 - 1,2,1,3
DP2-Math - 1,6,7,8 - 1,4,3,4

The end result needs to be
DP1-Math - 1 - 2
DP1-Math - 3 - 4
DP1-Math - 5 - 1
D1-Math - 6 - 3

So on and so forth

thanks for you help

Hey @ANTONY_RAPPAI :wave:

I pasted your sample data into a Google Sheet and was able to generate these results with this flow:

Feel free to paste this snippet into your flow to follow this approach: parabola:cb:45f171e3037544f08b7c435eaff06fe6

I also put together this quick video to help make sense of the flow.

Let me know if you have any questions!

1 Like

Thank you, that works. Excellent video too, you explained it really well

2 Likes