+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Removing Text from Cells

  1. #1
    Registered User
    Join Date
    11-07-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Removing Text from Cells

    My question is lets say you have a column with Last Name First Name Middle Initial.
    and in another column just the last name. Is there a simple way of removing the Last name only from the first column? Some of the databases I use have 10's of thousands of names on them in this manner.

    Thanks
    Randy

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Removing Text from Cells

    If the last name is always first, you can use this formula:

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

    This assumes your name is in cell A1, and a space seperates the last name from the rest.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    11-07-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Removing Text from Cells

    I can separate the last name out using the method you gave me or using the replace command and deleting everything after the first space. But if my names appear in a column like this:
    GARCIA FRANK JR & IRENE
    CASIAS JIMMY R & ROSA
    MC CARTY RICKY D ET UX
    WHITEFIELD CURTIS STANLEY &
    VASQUEZ GILBERTO & ANITA
    RAMOS YSIDRO & MARIE
    PINA AURELIO F &
    JAMISON ETHEL & MARY ELIZABETH BURR
    FLORES CHRIS & JULIE
    LOPEZ PAULA S MRS
    DE LOS SANTOS TEODORA G
    GARZA RAMIRO M & SUSIE
    MORRISON GARY & BELINDA
    WATERS MORRIS ALVIN ESTATE
    CHAPA ANTONIO & NORMA
    ZAPATA LUIS
    WHITTENBURG RICHARD B JR
    SILLS CONNIE & LULA
    MONTEZ JESSUS TR
    ORTEGA LORENZO & ROSARIO
    WHITE CHARLES E &
    COLEGIO GEORGE V JR
    How do I remove only the last name leaving me the first names only?

  4. #4
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Removing Text from Cells

    =right(a1,len(a1)-find(" ",a1,1))

  5. #5
    Registered User
    Join Date
    11-07-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Removing Text from Cells

    Works perfectly.....Thanks so much!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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