+ Reply to Thread
Results 1 to 11 of 11

Linking cells for unique ID

  1. #1
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Linking cells for unique ID

    Hello, everyone,
    I would like to create a column for a database query whose content serves as a unique ID.

    For this purpose an empty column A is to be inserted into the Excel table.
    The contents of all following columns should be linked until there are no more columns with contents.
    The separator between the chained cell contents is a hyphen.

    The value in column B is to be taken over completely no matter what is in it.
    Starting from column C the values should be taken over as follows:

    If there is a number in front of the letters, it will be omitted.
    If there is a number after the letters, whether with space or directly, the remaining cell content from and including the first letter should be transferred.
    If there is only a number without letters in the cell, it will be completely ignored.

    Summarized this means:
    All letters will be taken from the first letter on, no matter what comes after it.
    Numbers in front of the letters are omitted.

    Hopefully the picture example will make it ab bit clearer.
    The figure shows what the finished column A looks like.
    Columns I and J are notes.

    ID2.png


    I hope you can help me.
    Thanks a great lot.
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Linking cells for unique ID

    Hi there,
    What about extra spaces and . in the cell? Ignore these too?
    I would also suggest all uppercase as ID and yes, it can be done probably with a formula or else using a macro but I don't know is this last option is an option for you.
    You could write a UDF that does all the work for you
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Linking cells for unique ID

    Thank you for your answer.
    the extra spaces and . should all be copied. Everything should be copied after and including the first letter in the cell.

    I would prefer a VBA but I am also very greatful for a formula.

    Thank you very much for asking.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Linking cells for unique ID

    Will see what I can do for you

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Linking cells for unique ID

    Based on your attachment.
    UDF
    Use in cell like
    A2
    =GetID(B2:H2,"-")

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Linking cells for unique ID

    Nice code, looks good

  7. #7
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Linking cells for unique ID

    Hi jindin,
    thank you it works perfectly.
    I hope you don't mind me saying that it works with
    =GetID(B2:H2;"-")

    Thank you and thank you again.
    You are awesome

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Linking cells for unique ID

    Quote Originally Posted by CoSinus View Post
    I hope you don't mind me saying that it works with
    =GetID(B2:H2;"-")
    I don't care.
    It's just a matter of your regional settings.



    If that takes care of your original question, select Thread Tools from the menu link above and mark this thread as SOLVED.

  9. #9
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Linking cells for unique ID

    Hello, jindon,
    the VBA works great and I have already handled about 15 workbooks.

    However, my quad-core can't do this above 100 lines.
    I also don't know if Excel supports Quad-Core.
    Anyway, he has been working for 3 hours on an Excel file with 350 lines and he can't finish it.

    Is it possible to have a formula for these large tables.
    Since I don't have many of these tables, I can enter the formula manually.

    Thanks again.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Linking cells for unique ID

    My old little PC calculates more than 5K lines without any problem, so no idea.

  11. #11
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Linking cells for unique ID

    IŽll try another PC.
    Thanks for the tipp.

+ 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] Linking up data from 2 different sheets with a unique ID
    By CC4581 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-30-2017, 03:56 PM
  2. [SOLVED] Unique pull for linking another formula
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2015, 04:59 PM
  3. Replies: 1
    Last Post: 01-28-2013, 04:28 AM
  4. Linking unique data entry between worksheets
    By MatthewCotton in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2012, 03:59 AM
  5. Replies: 1
    Last Post: 03-13-2012, 07:03 PM
  6. linking a common unique value across multiple worksheets
    By dopple in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-14-2008, 10:48 AM
  7. How to count unique occurances linking two columns
    By nebula786 in forum Excel General
    Replies: 1
    Last Post: 06-29-2007, 01:19 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