+ Reply to Thread
Results 1 to 8 of 8

Part Number Generator

  1. #1
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Part Number Generator

    Hi
    I have a series of various part numbers to create from a set of categories.

    What I want to do is have a formula / VBA that will make a part number from the options.
    At the minute I've started copy/pasting the numbers.
    Is there a way to get this done without copy/pasting?

    I have added an example sheet to the post.

    The options are in highlighted section at the top and the table below is the start I have made.

    Thanks
    Kieran
    Attached Files Attached Files

  2. #2
    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
    30,895

    Re: Part Number Generator

    It is not clear to me what constitutes a"Part Number": you appear to have combinations of the different components (a possible 3888 in total).

    Me being dim here!

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Part Number Generator

    Please try at A23:H23

    =INDEX(A2:A10,MOD(INT(SEQUENCE(PRODUCT(MMULT(TRANSPOSE(ROW($A$2:$H$10))^0,N($A$2:$H$10<>""))),,0)/MAX(1,PRODUCT(MMULT(TRANSPOSE(ROW($B$2:$H$10))^0,N(B2:$H10<>""))))),COUNTA(A2:A10))+1)
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Re: Part Number Generator

    Quote Originally Posted by JohnTopley View Post
    It is not clear to me what constitutes a"Part Number": you appear to have combinations of the different components (a possible 3888 in total).

    Me being dim here!
    No you're correct


    a part number would be iTCPPF2200, iTCPPPF220I etc

  5. #5
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Re: Part Number Generator

    Quote Originally Posted by Bo_Ry View Post
    Please try at A23:H23

    =INDEX(A2:A10,MOD(INT(SEQUENCE(PRODUCT(MMULT(TRANSPOSE(ROW($A$2:$H$10))^0,N($A$2:$H$10<>""))),,0)/MAX(1,PRODUCT(MMULT(TRANSPOSE(ROW($B$2:$H$10))^0,N(B2:$H10<>""))))),COUNTA(A2:A10))+1)
    Thank you Bo_Ry!! :D
    That's great, now need to match the descriptions to these part code bits, i'd hid the descriptions on that sheet in the highlighted area.
    I'll have a go at those now.

  6. #6
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Re: Part Number Generator

    Quote Originally Posted by Bo_Ry View Post
    Please try at A23:H23

    =INDEX(A2:A10,MOD(INT(SEQUENCE(PRODUCT(MMULT(TRANSPOSE(ROW($A$2:$H$10))^0,N($A$2:$H$10<>""))),,0)/MAX(1,PRODUCT(MMULT(TRANSPOSE(ROW($B$2:$H$10))^0,N(B2:$H10<>""))))),COUNTA(A2:A10))+1)
    I've copied the formula into my sheet and (ctrl,shft,ent) on the cell and now getting a #name error?

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Part Number Generator

    If you use MS365 then update your MS office.

    If not then

    A23
    =INDEX(A$2:A$10,MOD(INT((ROWS(A$23:A35)-1)/MAX(1,PRODUCT(MMULT(TRANSPOSE(ROW($B$2:$H$10))^0,N(B$2:$H$10<>""))))),COUNTA(A$2:A$10))+1)

    Ctrl+Shift+Enter and copy over to all
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Re: Part Number Generator

    Quote Originally Posted by Bo_Ry View Post
    If you use MS365 then update your MS office.

    If not then

    A23
    =INDEX(A$2:A$10,MOD(INT((ROWS(A$23:A35)-1)/MAX(1,PRODUCT(MMULT(TRANSPOSE(ROW($B$2:$H$10))^0,N(B$2:$H$10<>""))))),COUNTA(A$2:A$10))+1)

    Ctrl+Shift+Enter and copy over to all
    Thanks got it working now

+ 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. Replies: 6
    Last Post: 03-11-2019, 05:06 AM
  2. [SOLVED] Enter part nrs consist....it display part number needed
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2017, 07:16 AM
  3. Random number generator with x number of duplicates
    By atomichybrid in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2016, 05:48 AM
  4. Help returning part number 1 time and adding up like part number QTY
    By SOLERSA in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-16-2014, 06:31 AM
  5. Number generator
    By Desina in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-07-2013, 12:08 PM
  6. Find Part number through Macro and output to associated part to certain cell
    By boylers75 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 04:32 PM
  7. [SOLVED] same number appears in a random number generator
    By Carmel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-27-2006, 07:25 PM

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