+ Reply to Thread
Results 1 to 10 of 10

Serial Number Generator

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    23

    Serial Number Generator

    Hi
    Not sure if im in the right place (excel), but i am looking to set up a serial number generator for my company.
    Preferably alpha numeric 12-14 digits.
    I dont mind if they follow in sequence, but randomized would be totally awesome....but then would i need to go down a different route like programming or something? I have no experience with this so its not an option for me.

    Can anyone advise me where to start?

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Serial Number Generator

    This will provide random numbers between 12 - 14 digits
    =RANDBETWEEN(100000000000,99999999999999)
    or type a number in A1. in A2: =A1+1 and drag it down to be in order.
    Last edited by AliGW; 07-13-2018 at 04:48 AM. Reason: Edited in error - sorry! Now fixed.
    Click the * to say thanks.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Serial Number Generator

    Here's one way:

    Excel 2016 (Windows) 32 bit
    A
    1
    Header
    2
    SN100000001
    3
    SN100000002
    4
    SN100000003
    5
    SN100000004
    6
    SN100000005
    7
    SN100000006
    8
    SN100000007
    9
    SN100000008
    10
    SN100000009
    11
    SN100000010
    12
    SN100000011
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    A
    2
    ="SN"&100000000+COUNTA(A$1:A1)
    Sheet: Sheet1

    You could set each row to be blank until other data appears on the row.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    10-15-2012
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Serial Number Generator

    WoW thanks Paul that was quick. Its it possible to:
    Add letters? (i guess i could do this in a separate cell anyway)
    Say how many digits it should be?
    Make sure there are no duplicates?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Serial Number Generator

    See my offering above.

    RANDBETWEEN does not generate UNIQUE numbers, so be aware of that - you could, in theory, end up with duplicate IDs.

  6. #6
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Serial Number Generator

    To create a unique list of random number you will need helper columns. Honestly, I would go with Ali's formula as it keeps it simple.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Serial Number Generator

    Why do you want them in random order? That seems a bit bizarre, IMHO.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  8. #8
    Registered User
    Join Date
    10-15-2012
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Serial Number Generator

    Thanks Ali, i had missed your post, looks like exactly what i need in a very simple way. Thanks again.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Serial Number Generator

    Thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Serial Number Generator

    See the attached sheet, which uses this array formula:

    ="ABCD"&TEXT(LARGE(ROW($1:$1000)*NOT(COUNTIF($A$1:A1, ROW($1:$1000))), RANDBETWEEN(1,1001-ROW(A1))),"000")

    to generate random, non-repeating numbers. bear in mind, however, that RANDBETWEEN is volatile and the serial numbers will change every time ANYTHING changes on your sheet.

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    My view: Stick with Ali's approach.
    Attached Files Attached Files

+ 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. [SOLVED] count number in serial and break up serial count
    By gondal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2016, 08:44 AM
  2. 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
  3. code to generate serial number based on number of records
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2015, 03:21 AM
  4. [SOLVED] Serial Number generator by Day, two week cycle, pattern driven?
    By Speshul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-14-2014, 12:52 PM
  5. Serial number generator for document (application form)
    By jaysakle in forum Excel General
    Replies: 2
    Last Post: 03-04-2014, 03:51 AM
  6. Overwrite the advanced filtered data serial number column with unique number
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-15-2012, 12:38 AM
  7. Finding a serial number in a list of serial numbers
    By zocoloco in forum Excel General
    Replies: 2
    Last Post: 02-04-2009, 05:20 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