+ Reply to Thread
Results 1 to 7 of 7

Extracting part number from number string

  1. #1
    Registered User
    Join Date
    05-08-2017
    Location
    bla
    MS-Off Ver
    2010/2013
    Posts
    62

    Extracting part number from number string

    I think that I am stuck on a problem that should be very easy to solve...

    I have made a pivot table to extract certain parts/part numbers from a lot of assemblies.

    After that I extracted the seperate parts that I needed from the pivot table in new columns seperated per type of part.
    Then I added them together in the column next to it and filtered that column for unique combinaties of those parts.

    The problem that I am now stuck with though is that I now have a string of numbers that consists of 2 different part numbers. So I want to untangle them.

    But how do I do that when the part numbers aren't a constant length? (They can be 8/9 or 11 numbers long, and there might even be more variations that I'm not yet aware of).
    All I know is that the second part numbers starts with 250, so it should be able to write a formula to seperate it based on that information I guess...

    So can anyone help me with this?

    For example:
    number string original --> should become these separate numbers (preferably in seperate columns, but if that is done with 2 seperate formula's, that is perfectly fine).
    2101305005125017770050 --> 21013050051 & 25017770050
    21010850025015940050 --> 210108500 & 25015940050
    21000830025015100 --> 210008300 & 25015100

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Extracting part number from number string

    Quote Originally Posted by ruub7 View Post
    Then I added them together in the column next to it and filtered that column for unique combinaties of those parts.
    I would recommend that you add a delimiter at this stage, such as a pipe symbol. You can then use that to split the part numbers back out again later, which seems safer than relying on the first part number not containing '250' in it.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Extracting part number from number string

    Try

    Data in A1 (as TEXT)

    in B1

    =LEFT($A1,FIND("250",$A1)-1)

    in C1

    =SUBSTITUTE($A1,$B1,"")

    See very good advice in previous post:

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Extracting part number from number string

    If your data in "A2"
    In "B2"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    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: Extracting part number from number string

    Enter formula in B1 and drag across to C1 and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C
    1 2101305005125017770050 21013050051 25017770050
    2 21010850025015900000 210108500 25015900000
    3 21000830025015100 210008300 25015100
    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

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Extracting part number from number string

    Quote Originally Posted by ruub7 View Post
    After that I extracted the seperate parts that I needed from the pivot table in new columns seperated per type of part.
    Then I added them together in the column next to it and filtered that column for unique combinaties of those parts.
    Instead of finding formulas why not include the two first columns in your "remove duplicates"
    if you select multiple columns you can specify which column must have unique values.

  7. #7
    Registered User
    Join Date
    05-08-2017
    Location
    bla
    MS-Off Ver
    2010/2013
    Posts
    62

    Re: Extracting part number from number string

    Thnx nitwit .
    That is a good idea, will do that!

+ 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. Help with extracting second last number from string
    By maym in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-12-2017, 10:03 PM
  2. Extracting the part number PN : ######### and the SN :######.
    By JetRich in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-16-2014, 08:36 PM
  3. [SOLVED] Extracting a number from a string
    By cool_anu4u in forum Excel General
    Replies: 1
    Last Post: 10-17-2013, 05:24 AM
  4. Replies: 12
    Last Post: 03-20-2013, 05:46 PM
  5. Extracting a number (part of a series of numbers) from a text string
    By dannyjoer in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-09-2012, 10:17 AM
  6. [SOLVED] extracting a part of a number from one cell to another
    By sverre123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-10-2012, 10:00 AM
  7. Extracting a number from a string
    By dsexpress in forum Excel General
    Replies: 3
    Last Post: 04-26-2008, 08:41 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