+ Reply to Thread
Results 1 to 9 of 9

extracting last name

  1. #1
    Ron de Bruin
    Guest

    Re: extracting last name

    Try this with the nhame in D2

    =IF(ISERR(FIND(" ",D2)),D2,MID(D2,FIND("^^",SUBSTITUTE(D2," ","^^",LEN(D2)-LEN(SUBSTITUTE(D2," ",""))))+1,1024))

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "maryj" <maryj@discussions.microsoft.com> wrote in message news:AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com...
    >I have names of individuals in Column A. Some have only first and last,
    > others also include the middle initial. I want to extract the last name of
    > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > ",A1)) which works great for those names that don't include the middle
    > initial. How can I modify this to work for either situation? Thanks!!!
    > --
    > maryj




  2. #2
    N Harkawat
    Guest

    Re: extracting last name

    =MID(A1,LOOKUP(2,1/(MID(" "&A1,ROW(INDIRECT("1:1024")),1)="
    "),ROW(INDIRECT("1:1024"))),1024)

    "maryj" <maryj@discussions.microsoft.com> wrote in message
    news:AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com...
    >I have names of individuals in Column A. Some have only first and last,
    > others also include the middle initial. I want to extract the last name of
    > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > ",A1)) which works great for those names that don't include the middle
    > initial. How can I modify this to work for either situation? Thanks!!!
    > --
    > maryj




  3. #3
    Domenic
    Guest

    Re: extracting last name

    Try...

    =RIGHT(A1,LEN(A1)-SEARCH("^^",SUBSTITUTE(A1,"
    ","^^",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))

    Hope this helps!

    In article <AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com>,
    "maryj" <maryj@discussions.microsoft.com> wrote:

    > I have names of individuals in Column A. Some have only first and last,
    > others also include the middle initial. I want to extract the last name of
    > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > ",A1)) which works great for those names that don't include the middle
    > initial. How can I modify this to work for either situation? Thanks!!!


  4. #4
    maryj
    Guest

    Re: extracting last name

    Thanks Ron - that worked! Can you explain what the ^^ mean and why the 1024
    at the end?
    --
    maryj


    "Ron de Bruin" wrote:

    > Try this with the nhame in D2
    >
    > =IF(ISERR(FIND(" ",D2)),D2,MID(D2,FIND("^^",SUBSTITUTE(D2," ","^^",LEN(D2)-LEN(SUBSTITUTE(D2," ",""))))+1,1024))
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "maryj" <maryj@discussions.microsoft.com> wrote in message news:AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com...
    > >I have names of individuals in Column A. Some have only first and last,
    > > others also include the middle initial. I want to extract the last name of
    > > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > > ",A1)) which works great for those names that don't include the middle
    > > initial. How can I modify this to work for either situation? Thanks!!!
    > > --
    > > maryj

    >
    >
    >


  5. #5
    maryj
    Guest

    extracting last name

    I have names of individuals in Column A. Some have only first and last,
    others also include the middle initial. I want to extract the last name of
    each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    ",A1)) which works great for those names that don't include the middle
    initial. How can I modify this to work for either situation? Thanks!!!
    --
    maryj

  6. #6
    Ron de Bruin
    Guest

    Re: extracting last name

    Try this with the nhame in D2

    =IF(ISERR(FIND(" ",D2)),D2,MID(D2,FIND("^^",SUBSTITUTE(D2," ","^^",LEN(D2)-LEN(SUBSTITUTE(D2," ",""))))+1,1024))

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "maryj" <maryj@discussions.microsoft.com> wrote in message news:AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com...
    >I have names of individuals in Column A. Some have only first and last,
    > others also include the middle initial. I want to extract the last name of
    > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > ",A1)) which works great for those names that don't include the middle
    > initial. How can I modify this to work for either situation? Thanks!!!
    > --
    > maryj




  7. #7
    N Harkawat
    Guest

    Re: extracting last name

    =MID(A1,LOOKUP(2,1/(MID(" "&A1,ROW(INDIRECT("1:1024")),1)="
    "),ROW(INDIRECT("1:1024"))),1024)

    "maryj" <maryj@discussions.microsoft.com> wrote in message
    news:AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com...
    >I have names of individuals in Column A. Some have only first and last,
    > others also include the middle initial. I want to extract the last name of
    > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > ",A1)) which works great for those names that don't include the middle
    > initial. How can I modify this to work for either situation? Thanks!!!
    > --
    > maryj




  8. #8
    Domenic
    Guest

    Re: extracting last name

    Try...

    =RIGHT(A1,LEN(A1)-SEARCH("^^",SUBSTITUTE(A1,"
    ","^^",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))

    Hope this helps!

    In article <AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com>,
    "maryj" <maryj@discussions.microsoft.com> wrote:

    > I have names of individuals in Column A. Some have only first and last,
    > others also include the middle initial. I want to extract the last name of
    > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > ",A1)) which works great for those names that don't include the middle
    > initial. How can I modify this to work for either situation? Thanks!!!


  9. #9
    maryj
    Guest

    Re: extracting last name

    Thanks Ron - that worked! Can you explain what the ^^ mean and why the 1024
    at the end?
    --
    maryj


    "Ron de Bruin" wrote:

    > Try this with the nhame in D2
    >
    > =IF(ISERR(FIND(" ",D2)),D2,MID(D2,FIND("^^",SUBSTITUTE(D2," ","^^",LEN(D2)-LEN(SUBSTITUTE(D2," ",""))))+1,1024))
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "maryj" <maryj@discussions.microsoft.com> wrote in message news:AEB62AF7-278A-4886-9BCF-3E680C3779BE@microsoft.com...
    > >I have names of individuals in Column A. Some have only first and last,
    > > others also include the middle initial. I want to extract the last name of
    > > each person into Column B. I used the formula =RIGHT(A1,LEN(A1)-SEARCH("
    > > ",A1)) which works great for those names that don't include the middle
    > > initial. How can I modify this to work for either situation? Thanks!!!
    > > --
    > > maryj

    >
    >
    >


+ 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