+ Reply to Thread
Results 1 to 3 of 3

Remove spaces between words

  1. #1
    Heather Tavitian
    Guest

    Remove spaces between words

    In Excel is there a SHFT command that can remove spaces between words.
    I need to concatenate the left four letters of the family name with the left
    two letters of the first name to achieve an individual code of six letters.
    However, some family names have a space. eg: De Vries Van Housten.
    I need to "Shift" the letters to the left to remove the space so that

    Janet De Vries becomes DEVRJA, not (as I'm getting) DE VJA

    Help me, I have a lot of these to do!
    Heather

  2. #2
    David McRitchie
    Guest

    Re: Remove spaces between words

    If Janet in not in the cell and it is just De Vries
    then you can use

    B1: De Vries
    C1: Janet
    D1: =UPPER(LEFT(SUBSTITUTE(B1," ",""),3) & left(C1,2))

    If they are all in one cell what if you had "Nancy Jo Cotton"
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Heather Tavitian" <Heather [email protected]> wrote in message
    news:[email protected]...
    > In Excel is there a SHFT command that can remove spaces between words.
    > I need to concatenate the left four letters of the family name with the left
    > two letters of the first name to achieve an individual code of six letters.
    > However, some family names have a space. eg: De Vries Van Housten.
    > I need to "Shift" the letters to the left to remove the space so that
    >
    > Janet De Vries becomes DEVRJA, not (as I'm getting) DE VJA
    >
    > Help me, I have a lot of these to do!
    > Heather




  3. #3
    Myrna Larson
    Guest

    Re: Remove spaces between words

    Assuming the last name is in A1 and the first name in B1:

    =LEFT(SUBSTITUTE(A1," ",""),4)&LEFT(B1,2)

    If the names are as you show, in one cell, this won't work.


    On Fri, 30 Sep 2005 16:43:01 -0700, "Heather Tavitian" <Heather
    [email protected]> wrote:

    >In Excel is there a SHFT command that can remove spaces between words.
    >I need to concatenate the left four letters of the family name with the left
    >two letters of the first name to achieve an individual code of six letters.
    >However, some family names have a space. eg: De Vries Van Housten.
    >I need to "Shift" the letters to the left to remove the space so that
    >
    >Janet De Vries becomes DEVRJA, not (as I'm getting) DE VJA
    >
    >Help me, I have a lot of these to do!
    >Heather


+ 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