+ Reply to Thread
Results 1 to 3 of 3

Remove Leading Character in List

Hybrid View

  1. #1
    Registered User
    Join Date
    05-08-2008
    Posts
    40

    Remove Leading Character in List

    This would appear simple, but its doing my head in.

    I have a long list of part numbers that start with the letter X.

    I want to remove the X from the part number, the problem is the X can also appear elsewhere in the part number but I need that to remain in place.

    Eg..

    X1234X-H

    needs to be

    1234X-H


    and

    XX1234-X2

    Needs to be

    X1234-X2.


    Its always the leading X, that needs to be rmeoved.

    The other X could appear in any location (apart from the beginning), and needs to remain in place.


    Thanks,
    Mike

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Remove Leading Character in List

    Maybe =if(left(a1)="x", mid(a1, 2, 255), a1)

    Or if they really ALL start with x, just =mid(a1, 2, 255)
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-08-2008
    Posts
    40

    Re: Remove Leading Character in List

    Quote Originally Posted by shg View Post
    Maybe =if(left(a1)="x", mid(a1, 2, 255), a1)

    Or if they really ALL start with x, just =mid(a1, 2, 255)
    See.. So quick and simple..

    Where would I be without you lot..

    Thanks so much for such a speedy resolution...

    The second one will suffice as the ALL start with an X


    Cheers,
    Mike

+ 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