+ Reply to Thread
Results 1 to 4 of 4

How to generate a unique id based on a dropdown list

Hybrid View

  1. #1
    Registered User
    Join Date
    11-11-2014
    Location
    nwt
    MS-Off Ver
    2013
    Posts
    2

    How to generate a unique id based on a dropdown list

    I have been trying to generate a unique id based on a drop down list ive created in my spreadsheet. The dropdown list gives 4 choices of media format (audio recordings, film and video, documents and images). I want a unique id given to each row entry, displayed in this example format: AR-000001

    I have created a table in a Lists sheet that has the media formats in the first column and the shortnames (ar, f&V, doc, and img) in the second column.

    I have tried using the following formula (as suggested in the thread "generate a unique id" which seemed to be exactly what i needed):

    IFERROR(VLOOKUP(A3,TABLE3,2,0)&TEXT(COUNTIF(A$3:A3,A3),"-000000"),"")

    what am i doing wrong? these functions are a bit new to me so i am obviously missing something somewhere!

    MUCH thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: How to generate a unique id based on a dropdown list

    Something like this?...I'm assuming, however, that once you input your Media Format from the dropdown, that it will not be changed (because only the first part of the ID will change). Paste into cell G3 on Sheet1 and it should auto update:

    =IFERROR(INDEX(Lists!$B$7:$B$10,MATCH(Sheet1!A3,Lists!$A$7:$A$10,0))&" -"&TEXT(ROWS($G$1:G3)-ROW($G$2),"000000"),"")
    Hope this helps.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: How to generate a unique id based on a dropdown list

    Seems to work just fine for me. Put an = sign in front of the formula maybe?
    Attached Files Attached Files
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: How to generate a unique id based on a dropdown list

    I suggest you shorten your table - you don't need to define it as having 1 million+ rows, as it will automatically grow when you add data. Delete all rows below, say, row 10, then you can put this formula in cell G3:

    =IFERROR(VLOOKUP(A3,Table3,2,0)&TEXT(COUNTIF(A$3:A3,A3),"-000000"),"")

    It should automatically fill down with unique IDs.

    Hope this helps.

    Pete

+ 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. Dropdown list always shows unique values from a column based on lookup value
    By swood15 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2014, 12:46 PM
  2. [SOLVED] Generate Unique list
    By Cavinaar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2013, 03:03 AM
  3. Replies: 7
    Last Post: 11-21-2011, 11:43 PM
  4. Unique dropdown list based on two criteria but...
    By Darsk in forum Excel General
    Replies: 2
    Last Post: 09-28-2011, 04:37 PM
  5. Generate a unique number of list
    By Terence Chan in forum Excel General
    Replies: 3
    Last Post: 09-14-2005, 02:48 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