+ Reply to Thread
Results 1 to 9 of 9

Creating Unique ID number

  1. #1
    Registered User
    Join Date
    03-24-2019
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    9

    Lightbulb Creating Unique ID number

    Hi All,

    I'm so close to having a formula work for me but fallen just short at the end:

    I have A Unique ID column which i want to auto populate based on the columns [first 2 letters of category]-[3 numbers in event]-[auto list number starting from 001 and going up]

    With the Code I have now i can get
    DM-001
    DM-001
    DM-001

    Which is correct however I want to add the -001 -002 and so on so it reads
    DM-001-001
    DM-001-002
    DM-001-003

    The formula im using is:
    Please Login or Register  to view this content.
    Any help would be great



    Unique ID help.PNG
    Last edited by ExcelDud91; 03-26-2019 at 12:19 AM. Reason: REMOVE OLD PHOTO

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Creating Unique ID number

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Creating Unique ID number

    Hi ExcelDud,

    Something like this formula using a helper column might be what you need.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See it in the attached example.
    Build Unique ID with Helper.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    03-24-2019
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Creating Unique ID number

    Thanks Marvin problem solved :D

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,428

    Re: Creating Unique ID number

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    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.

  6. #6
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Creating Unique ID number

    Hi MarvinP,
    can you send this solution for excel 2010. its not working.

  7. #7
    Registered User
    Join Date
    03-19-2019
    Location
    London
    MS-Off Ver
    2003-2016/2016 Mac
    Posts
    57

    Re: Creating Unique ID number

    Without the helper Column this formula should work:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Creating Unique ID number

    Thanks Saqib Qureshi.

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Creating Unique ID number

    Hi,

    I worry about all solutions above. The idea of a Unique ID is that they don't change even after a sort from another column. Both formulas might change IDs after sorting. If you get an answer you like with a formula, I'd past the Values Only over the top of the formula so they wouldn't change when sorting the table.

+ 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. Creating unique ID based on the number of entries
    By BWellman in forum Excel General
    Replies: 4
    Last Post: 06-15-2017, 12:51 PM
  2. Replies: 1
    Last Post: 05-20-2015, 04:27 PM
  3. Stuck with VBA Code. Creating a unique reference number with each macro click
    By blackburnsexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2014, 09:02 AM
  4. [SOLVED] Creating Unique Number Sequence
    By CCSLBuckles in forum Excel General
    Replies: 3
    Last Post: 10-12-2014, 12:16 AM
  5. Creating a unique reference number
    By Chesty in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-17-2013, 11:18 AM
  6. [SOLVED] Creating a unique form number upon Workbook Open
    By lancekeith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2013, 02:16 PM
  7. [SOLVED] Creating a unique ID number based on date and time
    By WillRn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2005, 09:06 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