+ Reply to Thread
Results 1 to 7 of 7

Excel Table Unique ID Based on 2 IDs

  1. #1
    Registered User
    Join Date
    09-28-2006
    Posts
    8

    Excel Table Unique ID Based on 2 IDs

    All,

    I have the Excel Table, that I want it to generate a unique ID for each new row.

    However I have 2 types of entries in the spreadsheet CR= "Change Request" EW = "Early Warning" (Project Management Terms).

    This will be a drop down selection in Column A

    Column B - Here I want to work out what was chosen in Column A and then add the next sequential number for either CR or EW

    So image of below is what I would like to achieve.

    snip.png

  2. #2
    Registered User
    Join Date
    10-21-2020
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    18

    Re: Excel Table Unique ID Based on 2 IDs

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

  3. #3
    Registered User
    Join Date
    09-28-2006
    Posts
    8

    Re: Excel Table Unique ID Based on 2 IDs

    Rio,

    Thanks for that, however as more entries are added all the existing rows also increase in number, so they all grow to say CR4 or EW4. (Because im in a excel table and each line added counts the column and not individual cell reference)
    Last edited by hsduk101; 11-25-2020 at 09:19 AM.

  4. #4
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Excel Table Unique ID Based on 2 IDs

    I don't think you have copied the formula correctly!

    Please double-check what you were given for B2, and then drag copy it down:

    =A2&COUNTIF($A$2:A2,A2)
    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.

  5. #5
    Registered User
    Join Date
    09-28-2006
    Posts
    8

    Re: Excel Table Unique ID Based on 2 IDs

    Entered in correctly, However this is what is happening.


    snip2.png

    As the table increases, the previous lines dynamically increment also. See formula in forumla bar and how the line above last has changed its range to A9 also

  6. #6
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Excel Table Unique ID Based on 2 IDs

    No, not entered correctly (two green triangles are a give away). If you had entered the formula correctly in B2 and drag copied down, that cell would show this:

    =A8&COUNTIF($A$2:A8,A8)

    and not this:

    =A8&COUNTIF($A$2:A9,A8)

    See the difference? User error, I am afraid - sorry.
    Last edited by AliGW; 11-25-2020 at 10:15 AM.

  7. #7
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Excel Table Unique ID Based on 2 IDs

    If you want the formula to fill down automatically, you'll need to use this in B2:

    =[@Change Request Type]&COUNTIF($A$2:[@Change Request Type],[@Change Request Type])
    Last edited by AliGW; 11-25-2020 at 10:15 AM.

+ 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. Insert blank rows above a table based on unique values in one of the columns in the table
    By carlito2002wgn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2019, 01:06 PM
  2. Insert blank rows above a table based on unique values in one of the columns in the table
    By carlito2002wgn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2019, 07:52 PM
  3. Inserting info to table with userform based on unique number
    By ngAL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-26-2016, 04:13 AM
  4. Trying to update an access table from Excel based on unique ID. rst.Update not working
    By Newbie0924 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 04:15 PM
  5. [SOLVED] A lookup function based on two criteria; one unique & one not unique to the lookup table
    By Trevasaurus in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2014, 11:35 AM
  6. [SOLVED] Multiple VLOOKUPs based on range of unique ID # from table
    By Webbers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2013, 12:29 PM
  7. Excel 2007 : Pivot Table Averages based on Unique Values
    By Fishbubbles in forum Excel General
    Replies: 1
    Last Post: 07-28-2011, 12:03 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