View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default 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