Forum Discussion
Split data from one column into two columns
- Mar 19, 2018
Hi Jonni,
This is the best technique to split any column based on a delimiter (Space, Comma...)
Hi Jonni,
This is the best technique to split any column based on a delimiter (Space, Comma...)
Thanks, Haythem!
But that only works if the first name and last name in every case are exactly the same length, as they are in your example. My database is composed of names of different lengths.
I tried your method, and wound up with some names being truncated, and in others part of the last name remained in the firstname column.
Jonni
- Haytham AmairahMar 19, 2018Silver Contributor
Hi Jonni,
Could you please provide us with a sample of your database to diagnose it and to provide you with the perfect solution?
- Jonni AndersonMar 19, 2018Copper Contributor
Greetings, Haytham!
See attached. You'll notice some of the names are first names only.
Thanks for your help!
Jonni
- Haytham AmairahMar 19, 2018Silver Contributor
Jonni,
I've tested the solution on your data, but it works just fine!
Every name the column A have two words (first name and last name) delimited by space is split into two cells.
If the name has a single word (first name), it stayed in place!The solution depends on the space as a delimiter between the first name and the last name, regardless of the length of the name.
If the name has more than one space or was in reversed order (Last Name First Name), the technique will not work!
Same thing if there is no space between the first name and the last name or if the first name or last name is consist of more than one word.