+ Reply to Thread
Results 1 to 5 of 5

Add an alpha character to duplicate records in a table

  1. #1
    Registered User
    Join Date
    03-21-2023
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    2

    Question Add an alpha character to duplicate records in a table

    Hi there. I'm trying to implement the solution from a past thread I found on this forum (can't post links yet!) into a table. The formula rather elegantly appends an alpha character starting with "a" to a reference in a range, with the idea being to calculate a unique reference to any duplicates in a range.

    My required implementation however needs to be in a table instead of being in a range. When adding a new record to the bottom of the table, the formula falls over as the table autofills for the next record, giving all entries the same "unique record" as the table grows.

    The attached is the solution as an array which works perfectly, and then a separate worksheet as a table, with my desired result alongside. I'm certain it is to do with the absolute references in the working range formula, but I can't figure out how to convert it to table ranges.

    I need this to remain a table, as there are other formulas which I want to auto populate when a new record is added each time in the full data set, to try and minimise data entry errors through the need for fill handle and copy/paste etc.

    Many thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,067

    Re: Add an alpha character to duplicate records in a table

    Will there ever be >26 duplicates for a single code?

    If not, then this works:

    =A2&CHAR(96+COUNTIF(A$2:[@Reference],[@Reference]))

    If there are more than 26 reps... what unique code should be applied after 123456z?
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-03-2012
    Location
    Bangalore, INDIA
    MS-Off Ver
    O365
    Posts
    54

    Re: Add an alpha character to duplicate records in a table

    Please try to use the solution provided by Glenn Kennedy. If you still want to use your method, then update the below formula in Sheet "Table" cell B2 & copy it down

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

  4. #4
    Registered User
    Join Date
    03-21-2023
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Add an alpha character to duplicate records in a table

    Hi Glenn, thank you so much for your prompt response. This works wonderfully for my needs. I can't envisage there being any more than 26 duplicates per reference. Last year the average was 2-3, and the max was 14, and that was highly exceptional!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,067

    Re: Add an alpha character to duplicate records in a table

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] Add an alpha character to duplicate entries
    By terreese in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-11-2023, 09:13 PM
  2. [SOLVED] Help please! Macro to add alpha character to duplicate records
    By hayleyzim in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-07-2021, 01:50 AM
  3. [SOLVED] 3 Character Alpha Numeric Permutations
    By N8237 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2012, 10:00 PM
  4. check duplicate records within same table
    By cthorn112 in forum Access Tables & Databases
    Replies: 0
    Last Post: 06-21-2012, 11:26 AM
  5. add alpha character
    By thillis in forum Excel General
    Replies: 6
    Last Post: 11-10-2009, 01:02 PM
  6. Parsing a alpha character out of a cell
    By Lram in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-17-2005, 06:05 PM
  7. Numerical grade to Alpha character
    By capecrusader in forum Excel General
    Replies: 6
    Last Post: 08-20-2005, 09:05 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