Help needed with split function excel!

Hello All,

I am scrapping some data from google and getting the result in the following format.
Uthsav Shetty | LinkedIn
Varsha Shetty - SAP BO/Qlikview - ATPI | LinkedIn
Khushboo Mathur - Business Development Manager - Commercial …
Sayali Kavalekar - Social Media and Communications - Boehringer …
Enamul Haider - Business Intelligence Analyst - The Madison Square …
Prajna Alva - Assistant Manager - KPMG Global Services (KGS …
Neha Reddy – Integration Data Engineer – ToolsGroup | LinkedIn
Satish Kurra - Senior Specialist - Data & Analytics Lead - KPMG US …

Now the 1st two words are the names followed by their current role. I need to split this string into 2 different strings 1st with the name and the 2nd with all the other data.

I am using variable1.ToString.Split("-"c) to get this done. But when the “–” is found instead of “-” an exception is thrown. I am not able to use more than 1 separator here.

Can anyone help ?

@VirajN,

Try below one:

variable1.ToString.Replace(“–”,“-”).Split("-"c)

1 Like

thank you this did help. just modified it a bit more to variable1.ToString.Replace(“–”,“-”).Replace(“|”,“-”).Split("-"c) and now it works like a charm

thanks once again

1 Like

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