+ Reply to Thread
Results 1 to 5 of 5

Unique-Code-Generate

  1. #1
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Unique-Code-Generate

    Hi all,
    i need you help to solve this issue. i am working to create a unique code by color and size criteria column E and F. column A i want code by formula and manually i type column B. first check color then size to make a code.

    please see the excel file.

    Thanks.
    Attached Files Attached Files

  2. #2
    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,914

    Re: Unique-Code-Generate

    This will get you the unique codes you need (although not quite in the format you specified):

    =D2&"-"&LEFT(C2,2)&"-"&COUNTIFS(C$2:C2,C2,D$2:D2,D2)

    Should work for your needs.
    Last edited by AliGW; 02-13-2020 at 04:49 AM.
    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.

  3. #3
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Unique-Code-Generate

    Its really perfect AliGW,
    but in the middle short form reflect the column C ( short form )

  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,914

    Re: Unique-Code-Generate

    Yes, I know, however you are making it unnecessarily complex. Unless you add a column where you give the short form you want to use, and then use that in your code, you are going to need a very complicated formula, because you are not using the same logic for all items.

    At the end of the day, you need a unique code, and that's what my formula provides. Unfortunately I don't have time today to help further with this.

  5. #5
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Unique-Code-Generate

    Agreed, Thanks

+ 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. Replies: 1
    Last Post: 02-24-2018, 10:56 AM
  2. Generate Unique ID
    By N323100 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-26-2017, 05:44 AM
  3. [SOLVED] Code to generate 2000 unique 8 digit numbers
    By Excelski in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-20-2017, 07:52 AM
  4. Formula to generate unique code
    By jamiem4 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-18-2015, 01:11 PM
  5. [SOLVED] How to generate a unique ID
    By matrixpom in forum Excel General
    Replies: 9
    Last Post: 01-30-2015, 09:46 AM
  6. [SOLVED] Code to generate a unique reference
    By matrixpom in forum Excel General
    Replies: 1
    Last Post: 02-24-2013, 08:16 PM
  7. Generate a list of unique code
    By luvul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2009, 04:40 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