+ Reply to Thread
Results 1 to 4 of 4

Extract Text from Numbers Where Text and Numbers are Different # of Characters

  1. #1
    Registered User
    Join Date
    12-06-2019
    Location
    Utah
    MS-Off Ver
    Office 365
    Posts
    37

    Extract Text from Numbers Where Text and Numbers are Different # of Characters

    I have a list of SKUs where I need to pull out just the size portion of the SKU. The size is always the last characters of the SKU but the size can be 1-4 characters long and the numbers part of the SKU can be varying lengths, as well. Plus some SKUs have 2 letters at the beginning of the SKU that tell me which category it belongs to. I know about RIGHT/LEFT formulas but that won't work easily when the size could be anywhere between 1-4 characters long. I also can't do a MID function because I don't have a character that is the same inside each SKU. How do I get the following list of SKUs to only spit me out its size?
    514262XXXL
    52T58303M
    DR1001.01174XXS
    OW1032170XS
    TP12161605XL

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Extract Text from Numbers Where Text and Numbers are Different # of Characters

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Extract Text from Numbers Where Text and Numbers are Different # of Characters

    There are a number of ways (as always with Excel), so here's one assuming your SKU is in A1:

    =RIGHT(A1,IF(ISERROR(MID(A1,LEN(A1)-3,1)*1),4,IF(ISERROR(MID(A1,LEN(A1)-2,1)*1),3,IF(ISERROR(MID(A1,LEN(A1)-1,1)*1),2,1))))

    Copy down as required.

    Hope this helps.

    Pete

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract Text from Numbers Where Text and Numbers are Different # of Characters

    Try this

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1
    2 514262XXXL XXXL
    3 52T58303M M
    4 DR1001.01174XXS XXS
    5 OW1032170XS XS
    6 TP12161605XL XL

    Here is a shorter formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 12-06-2019 at 10:58 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extract numbers after a specific text from a text string
    By robertovm28 in forum Excel General
    Replies: 7
    Last Post: 04-23-2019, 09:53 PM
  2. [SOLVED] Extract the text and numbers basis on specific numbers included
    By Neilesh Kumar in forum Excel General
    Replies: 6
    Last Post: 08-26-2018, 01:34 PM
  3. Replies: 6
    Last Post: 05-17-2018, 10:20 AM
  4. [SOLVED] Extract two numbers from text if two numbers exist
    By maym in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-02-2017, 01:08 PM
  5. Extract numbers from cell with Text and Numbers
    By wiredwrx in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-18-2006, 06:00 PM
  6. [SOLVED] How do I extract numbers from a cell with both text and numbers?
    By SHANNON in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-01-2005, 10:35 PM
  7. [SOLVED] extract numbers from cell containing text & numbers
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2005, 03:10 AM

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