How to split a cell string into two cells?

Hello Community :grinning_face_with_smiling_eyes:

Say I have multiple cells like “AT012+AT034” with some of them just being alone as “AT045” all under one column and I want the bot to read all the data and only write out unique names, but the ones like “AT012+AT034” have to be separated into two cells first “AT012” and then “AT034”.
How can I achieve this? I am aware of the code datatable.DefaultView.ToTable(True,“Column Name”) but am not sure about the splitting part.

Hi @lmoham

Filter the column which contains ‘+’ symbol, then hydrate the filtered data table and use split function to sperate the value.

Happy Automation

1 Like

Hi @lmoham !
Here is a suggestion: Get_unique_column_content.xaml (9.3 KB)
I worked with the following excel file, the input is in Sheet1, the output in Sheet2: file_.xlsx (10.6 KB)

Let us know if it does not work as expected or if you need more info on the code !


Thanks everyone, I got it to work as expected thanks for pointing me in the direction!

That’s great to hear !!
Don’t forget to mark as solved your topic so we can focus on unresolved ones :wink:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.