Is there a way to transform string of names and surnames to seperate rows?
Problem Description:
I have a string of names and surnames:
Name1 Surname1 Name2 Surname2 Name3 Surname3
and I want to transform it into separate columns like this:
Name and surname |
---|
Name1 Surname1 |
Name2 Surname2 |
Name3 Surname3 |
Name4 Surname4 |
I have tried Paste formatting -> Split text
with a space separator and then Paste special -> Transposed
, but it separates the first and last name into different columns (columns 6-11):
Name and surname |
---|
Name1 |
Surname1 |
Name2 |
Surname2 |
Name3 |
Surname3 |
I have also found this post which splits by a task number, but I can’t figure out the regex ((d+.)
pattern does not apply to my question. My actual names and surnames don’t have any index)
=TRANSPOSE(SPLIT(REGEXREPLACE(A1, "(d+.)", "♥$1"), "♥"))
Solution – 1
try this:
=TRANSPOSE(SPLIT(REGEXREPLACE(A2,"(S+) (S+) ","$1 $2🐠"),"🐠"))