+ Reply to Thread
Results 1 to 5 of 5

unique id generator

  1. #1
    Registered User
    Join Date
    03-09-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    1

    unique id generator

    School project:creating a booking system that will generate a unique id every time some one books a show. I have the formula to produce a unique id but every time I move onto the next cell the id changes so after I finished typing in a name and move onto typing in the email the id changes. My excel skills are very basic so anyone have a simple solution?

    Formula to create id:=(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(100,99999)

    Example of how it look below

    ID: Formula in here
    Name:
    Email:
    Select show:

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: unique id generator

    Rand() / RandBetween() both are volatile functions which change the result of the functions when any change that occurs in excel.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: unique id generator

    You can play with LEFT, RIGHT, MID, BASE and LEN functions

    example
    A
    B
    C
    1
    TS00017 Tom Johns [email protected]
    2
    3
    =UPPER(LEFT(B1,1)&RIGHT(B1,1))&BASE(LEN(C1),10,5)
    Sheet: Unique ID
    Last edited by sandy666; 03-09-2018 at 07:41 AM.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: unique id generator

    there is no guarantee the id will be unique as well, what makes it unique?` If some element of the time the booking was made was put in the ID ="A"&TEXT(NOW(),"YYMMDDHHMMSS")

    again it is a volatile function so you have to copy it as values.

    or you just keep incrementing a number by 1 each time a new one is added, this probably the easiest

    The solution would be with VBA as it could automatically create the value as text, so it wouldnt change, however we need to see a sample of the spreadsheet to put some code in to accomplish that

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: unique id generator

    or you can play with this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or shorter
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    both with iterative calculation enabled

    example
    A
    B
    C
    1
    TS-0075108999 Tom Johns [email protected]
    2
    MD-0036251263 Mike Oldfield [email protected]
    3
    IN-0046018454 Ian Anderson [email protected]
    4
    MD-0003784439 Mark Wild [email protected]
    5
    MD-0034594813 Mike Wald [email protected]
    Sheet: unique id

    you are limited by your imagination only
    Last edited by sandy666; 03-09-2018 at 09:23 AM.

+ 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] Formula for unique product code generator
    By igormigor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-31-2020, 10:36 PM
  2. [SOLVED] Random number generator with unique values
    By Jstns in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-01-2017, 09:47 AM
  3. [VBA] Create a random unique numbers generator without functions
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-27-2017, 07:33 AM
  4. [SOLVED] unique-string generator
    By bagullo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-14-2015, 10:56 AM
  5. [SOLVED] Use this unique ID generator macro to insert into a textbox in a userform
    By bg_enigma1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2012, 12:21 PM
  6. Unique Random Number generator
    By David Obeid in forum Excel General
    Replies: 3
    Last Post: 01-28-2008, 11:27 PM
  7. Unique Password Generator
    By AllanWilliams in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2007, 11: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