+ Reply to Thread
Results 1 to 11 of 11

Extracting the part number PN : ######### and the SN :######.

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    Kansas City
    MS-Off Ver
    Excel 2003
    Posts
    12

    Extracting the part number PN : ######### and the SN :######.

    I need to "section" some data out of a cell. What I have now is:

    21 octobre 2011 FLIGHT AUGMENTATION COMPU PN : B397BAM0510 SN : 725


    This is all in the first colum. The information that I need extracted is the part number PN : ######### and the SN :######.

    Any ideas?

    Thank you! Looking forward to learning a lot here in the future. Hopefully I'll input some ideas.
    Last edited by vlady; 01-16-2014 at 07:36 PM.

  2. #2
    Registered User
    Join Date
    10-27-2012
    Location
    London
    MS-Off Ver
    Excel 2007-2010
    Posts
    59

    Re: Extracting the part number PN : ######### and the SN :######.

    Hi JetRich,

    Select column, click data on the ribbon, click the text to columns, select delimited, select spaces, click finish.

    This will break the data into columns for you, and I imagine you will then be able to concatenate the data into the format you require. Otherwise add a workbook.

    BP
    Last edited by Break_Point; 01-16-2014 at 07:49 PM. Reason: spelling
    Break_Point

  3. #3
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Extracting the part number PN : ######### and the SN :######.

    Welcome to the forum

    Is the formatting always the same for the data in one column? Specifically, is there always a space, colon, and another space after "PN"?After that part, is the actual part number always a fixed number of characters? Is the SN also a fixed number of characters?

  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: Extracting the part number PN : ######### and the SN :######.

    Assuming your data is in A1:

    Formula:

    In B1

    =REPLACE(A1,1,FIND("PN",A1)-1,"")
    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

  5. #5
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Extracting the part number PN : ######### and the SN :######.

    Just thought I'd add this as well:

    For the PN: =MID(A1,FIND("PN",A1)+5,FIND("SN",A1)-1-(FIND("PN",A1)+4))
    For the SN: =RIGHT(A1,LEN(A1)-FIND("SN",A1)-4)

    Keep in mind, though, that if 'PN' or 'SN' happen to be in the actual name, then these formulas will not work. You would have to change "PN" to "PN : ", and likewise with "SN", and then change the number of characters necessary.

  6. #6
    Registered User
    Join Date
    01-16-2014
    Location
    Kansas City
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Extracting the part number PN : ######### and the SN :######.

    Quote Originally Posted by majosum View Post
    Welcome to the forum

    Is the formatting always the same for the data in one column? Specifically, is there always a space, colon, and another space after "PN"?After that part, is the actual part number always a fixed number of characters? Is the SN also a fixed number of characters?
    Yes, there is always a space, colon, and another space then the part number (which varies in characters and length) same thing with the serial number.

  7. #7
    Registered User
    Join Date
    01-16-2014
    Location
    Kansas City
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Extracting the part number PN : ######### and the SN :######.

    this worked, but returned the PN and SN in the same column. is there a way to separate them?

  8. #8
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Extracting the part number PN : ######### and the SN :######.

    Look at my response above. Enter each formula in a different cell.

  9. #9
    Registered User
    Join Date
    01-16-2014
    Location
    Kansas City
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Extracting the part number PN : ######### and the SN :######.

    majosum, worked like a champ. Thank you!

  10. #10
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Extracting the part number PN : ######### and the SN :######.

    No problem!

    Please keep in mind my warning though. If you happen to have a PN or SN in the actual name, this formula won't work correctly. If this may be a problem, let me know and I can edit the formulas.

  11. #11
    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 the part number PN : ######### and the SN :######.

    for PN

    =TRIM(MID(A1,FIND("PN",A1),FIND("SN",A1)-FIND("PN",A1)))


    for SN

    =REPLACE(A1,1,FIND("SN",A1)-1,"")

+ 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