+ Reply to Thread
Results 1 to 5 of 5

removing last 16 digits of the value of a cell

  1. #1
    Registered User
    Join Date
    07-18-2006
    Posts
    6

    removing last 16 digits of the value of a cell

    Hello,

    I have a quick question that I think can be easily answered, I am just struggling to get it to work correctly.

    I have a list of names and account numbers. The cells like like the below example:

    Smith, John M. xxxxxx4023820886

    The "X"s were not put in by me, they actually exist like that in the spreadsheet.

    I would like to remove the 16 digit account number. Each name obviously contains a different number of characters which is making this difficult for me.

    Thanks for the help,

    Brendan

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Looks like you could use Text to columns

    Data > Text to Columns

    Click delimter and use Other with the aposthophe sign ","

    Otherwise you could try =right(A1,16)

    VBA Noob

  3. #3
    SimonCC
    Guest

    RE: removing last 16 digits of the value of a cell

    Try:
    =LEFT(A1,LEN(A1)-16)

    -Simon

    "destrolennox" wrote:

    >
    > Hello,
    >
    > I have a quick question that I think can be easily answered, I am just
    > struggling to get it to work correctly.
    >
    > I have a list of names and account numbers. The cells like like the
    > below example:
    >
    > Smith, John M. xxxxxx4023820886
    >
    > The "X"s were not put in by me, they actually exist like that in the
    > spreadsheet.
    >
    > I would like to remove the 16 digit account number. Each name
    > obviously contains a different number of characters which is making
    > this difficult for me.
    >
    > Thanks for the help,
    >
    > Brendan
    >
    >
    > --
    > destrolennox
    > ------------------------------------------------------------------------
    > destrolennox's Profile: http://www.excelforum.com/member.php...o&userid=36503
    > View this thread: http://www.excelforum.com/showthread...hreadid=562652
    >
    >


  4. #4
    Forum Contributor
    Join Date
    07-13-2006
    Posts
    400
    Quote Originally Posted by SimonCC
    Try:
    =LEFT(A1,LEN(A1)-16)

    well take 17 to get rid of the space
    =left(a1,len(a1)-17)
    or
    =trim(left(a1,len(a1)-16)

  5. #5
    Registered User
    Join Date
    07-18-2006
    Posts
    6
    Thanks for the help, i used the TRIM function and it worked perfectly

+ 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