ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Split a string (https://www.excelbanter.com/excel-programming/364472-split-string.html)

dealwi8me

Split a string
 

Hello all,

How can i break a string "Name Surname" that is in one cell to two
diffrent cells "Name" "Surname" ?
Is there a function i can use?

Thank you in advance!


--
dealwi8me
------------------------------------------------------------------------
dealwi8me's Profile: http://www.excelforum.com/member.php...o&userid=18854
View this thread: http://www.excelforum.com/showthread...hreadid=552563


Ardus Petus

Split a string
 
Name:
=LEFT(A1,SEARCH(" ",A1)-1)

Surname:
=RIGHT(A1,LEN(A1)-SEARCH(" ",A1))

HTH
--
AP

"dealwi8me" a écrit
dans le message de news:
...

Hello all,

How can i break a string "Name Surname" that is in one cell to two
diffrent cells "Name" "Surname" ?
Is there a function i can use?

Thank you in advance!


--
dealwi8me
------------------------------------------------------------------------
dealwi8me's Profile:
http://www.excelforum.com/member.php...o&userid=18854
View this thread: http://www.excelforum.com/showthread...hreadid=552563




Max

Split a string
 
"dealwi8me" wrote:
How can i break a string "Name Surname" that is in one cell to two
diffrent cells "Name" "Surname" ?
Is there a function i can use?


This might suffice ..

Assume data in A1 down

In B1:
=LEFT(TRIM(A1),SEARCH(" ",TRIM(A1))-1)

In C1:
=RIGHT(TRIM(A1),LEN(TRIM(A1))-SEARCH(" ",TRIM(A1)))

Select B1:C1, fill down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

dealwi8me[_2_]

Split a string
 

these functions will do!

thank you so much for your help :)


--
dealwi8me
------------------------------------------------------------------------
dealwi8me's Profile: http://www.excelforum.com/member.php...o&userid=18854
View this thread: http://www.excelforum.com/showthread...hreadid=552563


Max

Split a string
 
"dealwi8me" wrote:
these functions will do!
thank you so much for your help :)


You are welcome !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


All times are GMT +1. The time now is 08:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com