ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Quickie !! Split text in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/69367-quickie-split-text-cell.html)

Soapydux

Quickie !! Split text in a cell
 
Hi I am trying to split a name into firstname & surname, but cant seem
to do it.

I have in say Cell A1 John_Smith

and I want to automatically have

Cell B1 John
Cell C1 Smith

Thanks


Dave Peterson

Quickie !! Split text in a cell
 
Select the column
data|text to columns
delimited by a space (or other (underscore???))


Soapydux wrote:

Hi I am trying to split a name into firstname & surname, but cant seem
to do it.

I have in say Cell A1 John_Smith

and I want to automatically have

Cell B1 John
Cell C1 Smith

Thanks


--

Dave Peterson

Sloth

Quickie !! Split text in a cell
 
Dave's is the easiest method, but if you need a formula use these

=LEFT(A1,FIND("_",A1)-1)
=RIGHT(A1,LEN(A1)-FIND("_",A1))

"Soapydux" wrote:

Hi I am trying to split a name into firstname & surname, but cant seem
to do it.

I have in say Cell A1 John_Smith

and I want to automatically have

Cell B1 John
Cell C1 Smith

Thanks



Soapydux

Quickie !! Split text in a cell
 
Yep that works. Thanks ;0)



All times are GMT +1. The time now is 05:54 AM.

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