+ Reply to Thread
Results 1 to 4 of 4

Produce unique radoim ID's like this 6746F427-76D0-98AD-5990-4BD12A7F3916

  1. #1
    Registered User
    Join Date
    10-21-2018
    Location
    Atherton, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Produce unique radoim ID's like this 6746F427-76D0-98AD-5990-4BD12A7F3916

    how to we produce unique radom transaction ID's like this 6746F427-76D0-98AD-5990-4BD12A7F3916?

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,279

    Re: Produce unique radoim ID's like this 6746F427-76D0-98AD-5990-4BD12A7F3916

    .
    Paste into a regular module.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,136

    Re: Produce unique radoim ID's like this 6746F427-76D0-98AD-5990-4BD12A7F3916

    you posted in vba, so i'll give a vba solution. though this can be done using formulas as well. hard to tell for 1 ID, but the pattern i see is 4 digits, single alphabet or a permanent "F", 3 digits, dash, 2 digits, 1 alphabet or a permanent "D", 1 digit or zero, etc

    to randomize numbers, there's a function RANDBETWEEN. since it's 4 digits, randomize between 1 and 9999. you don't want just 1 to appear but 0001. so use FORMAT (TEXT in Excel) to show 4 digits.
    to randomize alphabets, there's a certain character code for each of them. you can find out through Excel via:
    =CODE("A")
    to combine them, use ampersand (&)
    you'll see 65 shown. Z would be 90. CHR (CHAR in Excel) to choose the code. so CHR(RANDBETWEEN(65 and 90)).
    something along this for the first part:

    Please Login or Register  to view this content.
    =TEXT(RANDBETWEEN(1,9999),"0000")&"-"&CHAR(RANDBETWEEN(65,90))&TEXT(RANDBETWEEN(1,999),"000")

    you can continue with the rest

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    10-21-2018
    Location
    Atherton, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Produce unique radoim ID's like this 6746F427-76D0-98AD-5990-4BD12A7F3916

    Thanks Logit and benishiryo for your efforts.

    I did end up finding this formula to work instead:

    =CONCATENATE(DEC2HEX(RANDBETWEEN(0,4294967295),8)," ",DEC2HEX(RANDBETWEEN(0,42949),4),"-",DEC2HEX(RANDBETWEEN(0,42949),4),"-",DEC2HEX(RANDBETWEEN(0,42949),4),"-",DEC2HEX(RANDBETWEEN(0,4294967295),8),DEC2HEX(RANDBETWEEN(0,42949),4))

+ 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. Lookup multiple sheets and produce unique results
    By Sthomson1984 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-08-2017, 02:37 AM
  2. Replies: 2
    Last Post: 07-17-2013, 10:42 AM
  3. Replies: 9
    Last Post: 06-28-2013, 03:49 PM
  4. VBA to produce a unique and incremented order number in col A
    By lday75 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-26-2013, 02:59 PM
  5. Combining two tables to produce new table with unique records
    By thales in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-22-2012, 04:47 AM
  6. Replies: 3
    Last Post: 01-16-2006, 02:10 AM
  7. [SOLVED] produce a formulate to produce assigned seats for dinner
    By DavidJoss in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-03-2005, 10:05 PM

Tags for this Thread

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