+ Reply to Thread
Results 1 to 15 of 15

Eliminate endings from part numbers

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    If the part numbers are in A2 down, and the suffixes to be removed are in a range called Sfx, then in B2 and copy down,

    =IFERROR(LEFT(A2, LEN(A2) - LEN(INDEX(Sfx, MATCH(TRUE, RIGHT(A2, LEN(Sfx) ) = Sfx, 0)))), A2)

    This is an array formula, meaning it MUST be confirmed with Ctrl+Shift+Enter, not just Enter. (With the cursor in the formula bar, hold down Ctrl and Shift, then press Enter.) You'll know you did it correctly if curly braces appear around the formula in the Formula Bar; you cannot type in the braces directly.

    The suffixes MUST be arranged in descending order by length. Otherwise, you might truncate only E4 from a part number whose last letters are RE4.
    Last edited by shg; 11-01-2008 at 06:14 PM.
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Registered User
    Join Date
    05-22-2008
    Location
    Orange County, CA
    MS-Off Ver
    MS XP
    Posts
    33
    Thank You all! Shg, you hit it dead on the nail. Thanks so much. I completely forgot that I have 2 exceptions to the list of part number endings. PARGT & KTT These 2 exceptions do not need to have the "T" eliminated. so for instance in part number MESPT92375KTT it needs to be left alone, and not have the last "T" eliminated. I appreciate your help!

+ 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