+ Reply to Thread
Results 1 to 7 of 7

SEARCH function to return First Name only

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    SEARCH function to return First Name only

    Cell A1 contains a Customer's name in either of these two formats:

    LAST, FIRST

    LAST, FIRST MIDDLE (sometimes the middle name is only a letter)

    We want Cell B1 to contain only the first name for either of the two formats above.


    Thank you in advance for help with this.

  2. #2
    Registered User
    Join Date
    01-23-2014
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: SEARCH function to return First Name only

    Hi,
    Is the word contains "," always with a space?

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,647

    Re: SEARCH function to return First Name only

    Assuming the Name is in A1, try this.....

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    01-28-2014
    Location
    Brno
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: SEARCH function to return First Name only

    Another way to go:
    =MID(A1,FIND(" ",A1)+1,IFERROR(FIND(" ",MID(A1,FIND(" ",A1)+1,LEN(A1)-FIND(" ",A1))),LEN(A1)-FIND(" ",A1)))

  5. #5
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: SEARCH function to return First Name only

    Try the following User Defined Function:

    Please Login or Register  to view this content.
    Gary's Student

  6. #6
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: SEARCH function to return First Name only

    Problem is solved. Thank you sktneer and others that offered solutions!

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,647

    Re: SEARCH function to return First Name only

    You're welcome. Glad I was able to help and thanks for the feedback as well.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA function to search partial string and return value
    By gorelordz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2014, 11:48 AM
  2. [SOLVED] Need Function to search columns and return a value.
    By SirDrums in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-21-2012, 08:33 PM
  3. [SOLVED] Macro (Or Function) To Search Sheet, Return Whole Row
    By CVinje in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2012, 05:43 PM
  4. Litsbox, search function, return data
    By Leamc in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2011, 08:26 AM
  5. function that will automatically search through col A for my name, return in Col B
    By dude_dude_dude in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2008, 02:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1