+ Reply to Thread
Results 1 to 7 of 7

Trying to create a unique identifier based on column and running into duplicates

  1. #1
    Registered User
    Join Date
    01-29-2021
    Location
    Boston, Mass
    MS-Off Ver
    2016
    Posts
    4

    Trying to create a unique identifier based on column and running into duplicates

    I have a data set split into categories like 7511, 7512, etc. These categories are listed in ascending order in column A. Each category has subsets of data which consist of numerous columns shown as the letters below. I am trying to create a unique identifier in column F for each subset of data based on the category number to be used for other work. I am running into the issue of duplicate UI values if a category has more than 10 subsets of data. The current formula I am using is:

    =IF(A2=A1,F1+1,A1&1).

    Is there anyway to amend this formula so the 10th row per category and higher show up as ####10, ####11, etc. instead of ###20, ###21 and so on.

    Category data UI
    7511 abcdefg 75111
    7511 abcdefg 75112
    7511 abcdefg 75113
    7511 abcdefg 75114
    7511 abcdefg 75115
    7511 abcdefg 75116
    7511 abcdefg 75117
    7511 abcdefg 75118
    7511 abcdefg 75119
    7511 abcdefg 75120
    7511 abcdefg 75121
    7512 abcdefg 75121
    7512 abcdefg 75122
    7512 abcdefg 75123
    Attached Files Attached Files
    Last edited by cmac7755; 09-17-2021 at 06:08 PM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,424

    Re: Trying to create a unique identifier based on column and running into duplicates

    We need more information .... in context.

    Please see upload instructions at the top of this page. HOW TO ATTACH YOUR SAMPLE WORKBOOK:
    Dave

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,811

    Re: Trying to create a unique identifier based on column and running into duplicates

    What version of Excel are you using? Is it 2010? Please update your profile.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-29-2021
    Location
    Boston, Mass
    MS-Off Ver
    2016
    Posts
    4

    Re: Trying to create a unique identifier based on column and running into duplicates

    Microsoft Excel 2016

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,526

    Re: Trying to create a unique identifier based on column and running into duplicates

    What do you want to do if there is a duplicate of F12 and F13?


    The following formulas will encounter duplicates
    Cell F2 formula , Drag down

    HTML Code: 
    Other option

    HTML Code: 
    Last edited by wk9128; 09-17-2021 at 11:21 PM.

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,888

    Re: Trying to create a unique identifier based on column and running into duplicates

    Is there a limit to the number size in column F? How many rows can have the same category number?

    Anyway, you can try this in cell F2 and copy down. You can change the 10 to 100 or 1000 depending on the answers to my above questions.

    =IF(A2=A1,F1+1,A2*10&1)

  7. #7
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Trying to create a unique identifier based on column and running into duplicates

    It's depending on how many per category.
    The following formula can deal to 999 items per category.

    F2
    =A2&TEXT(COUNTIF(A$1:A2,A2),"000")

    Regards.

+ 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] Highlighting Duplicates within a unique identifier
    By lukequest in forum Excel General
    Replies: 7
    Last Post: 03-07-2019, 01:55 PM
  2. [SOLVED] Auto-fill Unique Identifier based on another column
    By jekeith in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-04-2018, 09:13 AM
  3. Create unique identifier using index and match
    By Crawfy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-16-2018, 02:43 AM
  4. Replies: 3
    Last Post: 10-24-2017, 05:44 AM
  5. Replies: 2
    Last Post: 09-12-2017, 06:45 AM
  6. [SOLVED] Counting a column of numbers based on a unique identifier
    By aaanenson in forum Excel General
    Replies: 2
    Last Post: 08-23-2012, 09:01 PM
  7. Replies: 5
    Last Post: 04-13-2012, 10:50 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