• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Concatenate texts and numbers for unique code

Thomas Kuriakose

Active Member
Respected Sirs,

We need to derive a unique code for every line based on the source picked as in the attached file.

i have used concatenate to arrive at the code based on the selections, kindly let me know whether there is a better way of getting this result, especially when the serial numbers have to be incremented with each entry.

Thank you very much,

with regards,
thomas
 

Attachments

  • Unique Code.xlsx
    11.1 KB · Views: 13
Hi Thomas,
If you need a meaningful code for the humans, I guess what you propose is fine. Your code has the following limitations;

- Pcode cannot be greater than 99
- A code does not have a meaning as multiple cities can start with the same letter
- Your code will not be useful after 999 items.

So, maybe you can improve these limits if you need to.

For differentiating the rows for the computer, you can just use the serial number, as it is unique for each row, you don't need the big text code. You can do all kinds of lookups or database operations based on the serial number.

Best,
AJ
 
Respected Sir,

Thank you for this information.

The Pcode and Acode given are fixed values and they will not be changed for a period on one year.

The problem we are facing is the increment serial numbers as this unique code is applicable only for source D.

We have other serial numbers in between where the unique code is not required and this creates a problem for the selection of correct serial number for the code.

Thanks,

with regards,
thomas
 
Back
Top