ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pulling only first name (https://www.excelbanter.com/excel-worksheet-functions/178221-pulling-only-first-name.html)

krc547

Pulling only first name
 
I need to pull the first names and first initial of last name into a cell. In
cell g I have the first and last name (john doe). I need cell c to look at
cell g nad return only john d.

Ron Rosenfeld

Pulling only first name
 
On Thu, 28 Feb 2008 10:30:06 -0800, krc547
wrote:

I need to pull the first names and first initial of last name into a cell. In
cell g I have the first and last name (john doe). I need cell c to look at
cell g nad return only john d.


Assuming the format is like what you show, then:

=LEFT(TRIM(G1),FIND(" ",TRIM(G1)))&MID(TRIM(G1),FIND(" ",TRIM(G1))+1,1)

--ron

David Biddulph[_2_]

Pulling only first name
 
=LEFT(G1,FIND(" ",G1)+1)
--
David Biddulph

"krc547" wrote in message
...
I need to pull the first names and first initial of last name into a cell.
In
cell g I have the first and last name (john doe). I need cell c to look at
cell g nad return only john d.




Tom Hutchins

Pulling only first name
 
If some of the names have middle initials (ie, John Q. Doe), this formula
will work (works without the middle initial also):

=LEFT(G1,SEARCH(" ",G1))&IF(ISERROR(SEARCH(".",G1)), MID(G1,SEARCH("
",G1)+1,1), MID(G1,SEARCH(".",G1)+2,1))

Hope this helps,

Hutch

"Ron Rosenfeld" wrote:

On Thu, 28 Feb 2008 10:30:06 -0800, krc547
wrote:

I need to pull the first names and first initial of last name into a cell. In
cell g I have the first and last name (john doe). I need cell c to look at
cell g nad return only john d.


Assuming the format is like what you show, then:

=LEFT(TRIM(G1),FIND(" ",TRIM(G1)))&MID(TRIM(G1),FIND(" ",TRIM(G1))+1,1)

--ron



All times are GMT +1. The time now is 12:43 PM.

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