+ Reply to Thread
Results 1 to 4 of 4

Create Client ID based on Customer Name, Company Name (No vowels, No Duplicates)

  1. #1
    Registered User
    Join Date
    10-12-2017
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    2

    Create Client ID based on Customer Name, Company Name (No vowels, No Duplicates)

    Dear Excel Experts,

    I'd like to create a client ID based on three consonants of the name, company name and a value to account for duplicates eg. Name: Mikkel and Kasper, Company name: Spreadsheeto. The client ID returns: MKKSPR01

    Ive been using:
    =UPPER(LEFT([@Name];3))&UPPER(LEFT([@Company];3))
    ... for the example above, this would return: MIKSPR

    (1) however I don't know how to return CONSONANTS ONLY
    (2) I don't know how to remove "The" at the beginning of some company names
    and (3) I don't know how to add a value at the end, (without excel removing the zero), and ensuring I am not getting duplicate entries with similar names

    To clarify (3) above, if we added another name "Mikky", with company name "Spraypainters Limited", i would like the customer ID to return: MKKSPR02
    (4) Its added the a two-digit value and accounted for the duplicate first 6 letters by adding 02 (not 01)

    My final table would have columns for Name, Company name, Telephone, Email, etc as well as a column for Client ID


    I appreciate any help on this matter

    Best regards
    Darren

  2. #2
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Create Client ID based on Customer Name, Company Name (No vowels, No Duplicates)

    Darrent,

    Have a solution that relies on the six letters being in a "helper" code that you can hide or put in white font.

    As shown on the attached, (1) formula in Col G strips out vowels and spaces and returns only consonants and (2) if the Company name starts with "The", the formula starts at the fifth letter of the company name, otherwise it starts at the first. It then selects the first three consonants from each and combines them.

    =IF(LEFT(B2,4)="The ",CONCATENATE(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(UPPER(A2),
    "A",""),"E",""),"I",""),"O",""),"U","")," ",""),3),MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(UPPER(B2),
    "A",""),"E",""),"I",""),"O",""),"U","")," ",""),5,3)),CONCATENATE(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(UPPER(A2),
    "A",""),"E",""),"I",""),"O",""),"U","")," ",""),3),LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(UPPER(B2),
    "A",""),"E",""),"I",""),"O",""),"U","")," ",""),3)))

    That goes into "helper" column G as in the attached.

    In the "Client ID" column, you then add the formula from C2 downward:
    =IF(COUNTIF(G$2:G2,G2)<10,G2&"0"&COUNTIF(G$2:G2,G2),G2&COUNTIF(G$2:G2,G2))

    Hope this helps

    Ochimus
    Attached Files Attached Files
    Last edited by Ochimus; 10-12-2017 at 06:05 PM.

  3. #3
    Registered User
    Join Date
    10-12-2017
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    2

    Smile Re: Create Client ID based on Customer Name, Company Name (No vowels, No Duplicates)

    Thank you so much this worked perfectly!

    I appreciate the prompt response, its helped a great deal

  4. #4
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Create Client ID based on Customer Name, Company Name (No vowels, No Duplicates)

    Darrent,

    Pleasure helping out.

    As it does what you want, can you just click on "thread tools" at the top of the page and mark the thread as "solved"? Shows others looking for something similar that there is an answer.

    Ochimus

+ 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] Client Data in Columns - how to create a client drop down
    By abearmenta in forum Excel General
    Replies: 9
    Last Post: 10-10-2016, 10:24 AM
  2. Macro to create new workbooks based on change in customer name
    By Yoogo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2016, 02:01 AM
  3. Replies: 6
    Last Post: 06-11-2015, 03:55 PM
  4. Random name generator with no duplicates for company's lucky draw segment
    By nekolaypeng in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-09-2014, 05:39 AM
  5. [SOLVED] Counting the ranks in a company without duplicates, multiple conditions
    By nickmessick1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 01:14 PM
  6. Chart to show different status of customer in company system
    By applesandpears in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-25-2013, 06:36 AM
  7. Eliminating duplication combination of company/customer
    By Sanjay_ioc in forum Excel General
    Replies: 0
    Last Post: 07-30-2012, 09:11 AM

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