+ Reply to Thread
Results 1 to 13 of 13

adding prefix to numbers

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    adding prefix to numbers

    Hello,

    I work in electonic manufacturing and have a customer that supplys me with there build of materals. I want to add our prefix numbers to there part numbers ex: all caps "C" ref des get 022 added to the front of them. Any ideas on how to do this fast and easy.

    Thanks

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: adding prefix to numbers

    Can you give examples of before and after...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: adding prefix to numbers

    can you post an example of the number you want to add a prefix of "022" to?

    EDIT: whoops, I was too slow
    Last edited by jwright650; 04-08-2011 at 10:45 AM. Reason: too slow
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  4. #4
    Registered User
    Join Date
    04-08-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: adding prefix to numbers

    534904P1 C1-C4, C7-C10, C15, C16, C18-C23, C25, C26, C51, C52, C56-C62, C64-C70, C75-C86 CAP S X5R 0.1UF 25DC 10% 63

    539922P1 Q2, Q3 ALT XSTR R MFN 100V 10.0A 185 64


    022534904P1 C1-C4, C7-C10, C15, C16, C18-C23, C25, C26, C51, C52, C56-C62, C64-C70, C75-C86 CAP S X5R 0.1UF 25DC 10% 63

    024539922P1 Q2, Q3 ALT XSTR R MFN 100V 10.0A 185 64

    hope this helps

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: adding prefix to numbers

    I don't understand that example.

    Are those strings in one cell?

    What decides if 0225 or 0245 get added to the prefix or any others?

    Please give direction.

  6. #6
    Registered User
    Join Date
    04-08-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: adding prefix to numbers

    They are in different cells Part number in one Ref in another and so on. Resisters get a 020 prefix, caps get a 022 ,IC Diodes get 024, connectors get 026 and so on down the line.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: adding prefix to numbers

    And how do we know what's a
    Resisters get a 020 prefix, caps get a 022 ,IC Diodes get 024, connectors get 026
    ..or the foremans' lunch for that matter.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  8. #8
    Registered User
    Join Date
    04-08-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: adding prefix to numbers

    I have attached one before and after. hope this helps
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: adding prefix to numbers

    Can you use VBA (If/ElseIF/Then, or maybe Select/Case/Loop) type of code to do this since there are alot of conditions to consider when assigning the prefixes?

  10. #10
    Registered User
    Join Date
    04-08-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: adding prefix to numbers

    They had some kind of VB program but it got lost I am not very good at programming

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: adding prefix to numbers

    There are duplictes in your code prefixes ALT appears three times, I have assumed the first in the list to be correct.
    Some items on the part description list have no prefix allocated these show as #N/A in Column G on sheet "Cost_BOM_417981G1_Prod" where I have put this formula
    In G2
    Please Login or Register  to view this content.
    Drag/Fill Down

    CodeList & Component are two dynamic named lists I have put in a new sheet "Lookups"
    Add and correct the prefixes and codes in this sheet columns D & E, the rest is just to show you the anomalies and should be deleted.

    Hope this helps.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-08-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: adding prefix to numbers

    Thanks Marcol,


    After looking in box after box here I found the program that they used before I started here. I dont have the source code to modify it. I have attached it here to show you what they are looking for. I only need the add avcom PN header to work. Any help will be thankful.
    Attached Files Attached Files

  13. #13
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: adding prefix to numbers

    That is an .exe file what do you expect to get from that? What language is it written in?

    More than likely it will be written in C, maybe VB at a push, this is not the forum for that type of problem.

    Why don't you find a list of your prefixes and what they apply to, it's easy to add to the sheet I gave you, if you do that then we might get somewhere.

    Sorry mate.
    Last edited by Marcol; 04-08-2011 at 02:54 PM.

+ 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