+ Reply to Thread
Results 1 to 9 of 9

Generate unique ID based on criteria from different columns

  1. #1
    Registered User
    Join Date
    09-14-2015
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    35

    Generate unique ID based on criteria from different columns

    How to create a unique ID based on criteria's from different columns. The formula should auto assign a new unique ID when a new entry is added in the manner :

    1) Assign a new & unique ID (next in series), if the description is new and not repeated earlier in the list. The new unique ID should consider the Risk Rating as well

    2) If the description is repeated, then assign the same unique ID as assigned to its predecessor.

    Attached a sample raw data.

    Unique ID Raw Data.JPG
    Attached Files Attached Files
    Last edited by cherias; 05-28-2019 at 11:34 PM.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Generate unique ID based on criteria from different columns

    Quote Originally Posted by cherias View Post
    2) If the description is repeated, then assign the same unique ID as assigned to its predecessor.
    Then it will no longer be unique.

  3. #3
    Registered User
    Join Date
    09-14-2015
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    35

    Re: Generate unique ID based on criteria from different columns

    @kersplash : Yes I understand that logic however my intent was that is a specific description is added to the list, then it will get the same ID that is already assigned to the description. For example, if Description 2 is added to the list, then the new entry will get the unique ID :- Risk ID_2_M

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Generate unique ID based on criteria from different columns

    Try this in D2 and copy down;
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-14-2015
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    35

    Re: Generate unique ID based on criteria from different columns

    Hello Kesplash,

    While in dummy raw data, the description is provided as " Description 1" .. "Description 2" ..... but in actual the real data would have a sentence or some text form and wont be so organised. So when I replaced the Description 1.. 2... with an actual text, the formula doesn't work. Please refer to the screen shot below.

    Kindly assist, on how to modify the formula if a text/sentence was there in Risk Description.

    Attachment 625557

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Generate unique ID based on criteria from different columns

    Attempting to open the attachment to post #5 prompts the following: "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
    Please upload a sample file (as in post #1) that demonstrates the type text that will be included in the Risk Description column instead.
    Remember to include expect results in the Unique ID column.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    09-14-2015
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    35

    Re: Generate unique ID based on criteria from different columns

    Hello JeteMc,

    As suggested, I have attached the file. I had done it earlier as well but for some reason its now missing. The expected results are already shown in screenshot and file attached in the first post. Please check and let know, if its fine or I can reattach.

    Thank You
    Attached Files Attached Files

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Generate unique ID based on criteria from different columns

    Please try at E2
    ="Risk ID_"&MATCH(C2,C$2:C$25,)&"_"&LEFT(B2)

  9. #9
    Registered User
    Join Date
    09-14-2015
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    35

    Re: Generate unique ID based on criteria from different columns

    Thank you Bo_Ry, this works as intended. Awesome and thanks a lot for the help.

+ 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. Return a unique list from two columns based on a criteria
    By elleb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-15-2018, 10:40 AM
  2. Replies: 11
    Last Post: 11-16-2017, 07:11 AM
  3. Replies: 3
    Last Post: 08-24-2017, 05:59 AM
  4. Count unique values in columns based on 2 criteria (error in one result)
    By t83357 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-17-2013, 03:25 PM
  5. [SOLVED] Count unique entries across columns based on criteria
    By flomme in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2013, 06:43 PM
  6. [SOLVED] Count unique values in columns based on 2 criteria
    By t83357 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2013, 04:33 PM
  7. Replies: 6
    Last Post: 10-18-2011, 07:34 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