+ Reply to Thread
Results 1 to 3 of 3

Truncate a string to a certain value

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Truncate a string to a certain value

    I have a series of codes, such as A-0A-01-123456v01. I need to get rid of everything from the v on. It's always
    going to be 3 characters, but the start can be 11-15 (like AAA-02-123456v02).
    I can use mid or left, but they assume consistency of character numbers.
    I can use right to isolate the v01 part, but that just gives me the part I want to be rid of.
    Any ideas? There has to be something simple I'm missing.

    Thanks in advance!

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Truncate a string to a certain value

    It's always going to be 3 characters
    hence

    =left(a1,len(a1)-3)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-17-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Truncate a string to a certain value

    This worked perfectly, thanks!

+ 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