+ Reply to Thread
Results 1 to 5 of 5

Trim cell contents-split the names

  1. #1
    Kim C via OfficeKB.com
    Guest

    Trim cell contents-split the names

    I have a long list of names in Excel where the first and last name are in one
    cell. I want to split the names with first name in one cell and last name in
    another cell. I know how to use the "Left" and "right" functions but then I
    have to use a different formula for each name since each name is a different
    length. Is there an easier way to do this?

    --
    Kim

  2. #2
    Anne Troy
    Guest

    re: Trim cell contents-split the names

    You bet. See Data-->Text to Columns:
    http://www.officearticles.com/excel/...soft_excel.htm

    *******************
    ~Anne Troy

    www.OfficeArticles.com
    www.MyExpertsOnline.com



    "Kim C via OfficeKB.com" <[email protected]> wrote in message
    news:[email protected]...
    > I have a long list of names in Excel where the first and last name are in

    one
    > cell. I want to split the names with first name in one cell and last name

    in
    > another cell. I know how to use the "Left" and "right" functions but then

    I
    > have to use a different formula for each name since each name is a

    different
    > length. Is there an easier way to do this?
    >
    > --
    > Kim




  3. #3
    KL
    Guest

    re: Trim cell contents-split the names

    Hi Kim,

    Try this:

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

    and

    =MID(TRIM(A1),FIND(" ",TRIM(A1))+1,LEN(TRIM(A1)))

    Regards,
    KL


    "Kim C via OfficeKB.com" <[email protected]> wrote in message
    news:[email protected]...
    >I have a long list of names in Excel where the first and last name are in
    >one
    > cell. I want to split the names with first name in one cell and last name
    > in
    > another cell. I know how to use the "Left" and "right" functions but then
    > I
    > have to use a different formula for each name since each name is a
    > different
    > length. Is there an easier way to do this?
    >
    > --
    > Kim




  4. #4
    Kim C via OfficeKB.com
    Guest

    re: Trim cell contents-split the names

    Thanks - that was too easy!

    Anne Troy wrote:
    >You bet. See Data-->Text to Columns:
    >http://www.officearticles.com/excel/...soft_excel.htm
    >
    >*******************
    >~Anne Troy
    >
    >www.OfficeArticles.com
    >www.MyExpertsOnline.com
    >
    >> I have a long list of names in Excel where the first and last name are in one
    >> cell. I want to split the names with first name in one cell and last name in
    >> another cell. I know how to use the "Left" and "right" functions but then I
    >> have to use a different formula for each name since each name is a different
    >> length. Is there an easier way to do this?


    --
    Kim


    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...tions/200507/1

  5. #5
    Kim C via OfficeKB.com
    Guest

    re: Trim cell contents-split the names

    Thanks for your help.

    KL wrote:
    >Hi Kim,
    >
    >Try this:
    >
    >=LEFT(TRIM(A1),FIND(" ",TRIM(A1))-1)
    >
    >and
    >
    >=MID(TRIM(A1),FIND(" ",TRIM(A1))+1,LEN(TRIM(A1)))
    >
    >Regards,
    >KL
    >
    >>I have a long list of names in Excel where the first and last name are in
    >>one

    >[quoted text clipped - 5 lines]
    >> different
    >> length. Is there an easier way to do this?


    --
    Kim


    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...tions/200507/1

+ 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