ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I extract part of a text string (https://www.excelbanter.com/excel-discussion-misc-queries/120420-how-do-i-extract-part-text-string.html)

Brennan

How do I extract part of a text string
 
I need to extract the first name from one cell and put it into another column.

Example:

John Smith John
Andrew Johnson Andrew
Michael White Michael

I'm sure its pretty easy, but I can't seem to figure it out. Can anyone help?



Dave F

How do I extract part of a text string
 
Use the text to columns tool--Data--Text to columns and select SPACE as your
delimeter.

Note: any data to the right of the column the names are in will be deleted
when you split the data into columns, so make sure you insert plenty of
columns befiore doing this.

Dave
--
Brevity is the soul of wit.


"Brennan" wrote:

I need to extract the first name from one cell and put it into another column.

Example:

John Smith John
Andrew Johnson Andrew
Michael White Michael

I'm sure its pretty easy, but I can't seem to figure it out. Can anyone help?



T. Valko

How do I extract part of a text string
 
Try this:

=LEFT(A1,FIND(" ",A1)-1)

Biff

"Brennan" wrote in message
...
I need to extract the first name from one cell and put it into another
column.

Example:

John Smith John
Andrew Johnson Andrew
Michael White Michael

I'm sure its pretty easy, but I can't seem to figure it out. Can anyone
help?






All times are GMT +1. The time now is 08:20 PM.

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