Trigram or Initials Generator.
Poctokom
Posted messages
20
Status
Membre
-
Jean_33 -
Jean_33 -
Hello,
Quick question.
In the company where I work, a user is responsible for creating a Trigram for each user.
The goal is to pick 3 letters from the first name and last name while ensuring that no duplicates are created.
Currently, she does this manually in an Excel file. This can lead to a few errors that are really problematic in the factory where I work.
Is there a way to automatically generate trigrams without duplicates?
Thanks in advance ;)
Quick question.
In the company where I work, a user is responsible for creating a Trigram for each user.
The goal is to pick 3 letters from the first name and last name while ensuring that no duplicates are created.
Currently, she does this manually in an Excel file. This can lead to a few errors that are really problematic in the factory where I work.
Is there a way to automatically generate trigrams without duplicates?
Thanks in advance ;)
4 réponses
Hello Poctokom,
To avoid manual entry errors, it is possible with Excel to program a VBA code that would create a trigram according to these rules, possibly prioritizing the initials, then with rules allowing to use the other letters in case of identity, and possibly numbers or symbols if all possibilities have been exhausted.
This requires defining these rules and a program that is not very simple to implement.
A more immediate and easy-to-implement solution is to use Excel's features to assist the person creating the trigrams manually to ensure they do not create a duplicate trigram.
One possibility is to use Excel's conditional formatting feature, by selecting the cells in the column that will contain the trigrams and clicking on Conditional Formatting - Highlight Cell Rules - Duplicate Values and choosing the desired format, for example, in my version, Excel offers by default a light red fill with dark red text.
(depending on the versions of Excel, the menus may vary)
When the person enters a duplicate value, the new cell containing the duplicate (and the existing cell) will be colored to indicate the cells containing duplicates, which should catch their attention and decrease the chances of errors :-)
Dal
P.S.: I am moving your question to the Programming - VBA forum in case someone wants to add to the answer with a code proposal.
To avoid manual entry errors, it is possible with Excel to program a VBA code that would create a trigram according to these rules, possibly prioritizing the initials, then with rules allowing to use the other letters in case of identity, and possibly numbers or symbols if all possibilities have been exhausted.
This requires defining these rules and a program that is not very simple to implement.
A more immediate and easy-to-implement solution is to use Excel's features to assist the person creating the trigrams manually to ensure they do not create a duplicate trigram.
One possibility is to use Excel's conditional formatting feature, by selecting the cells in the column that will contain the trigrams and clicking on Conditional Formatting - Highlight Cell Rules - Duplicate Values and choosing the desired format, for example, in my version, Excel offers by default a light red fill with dark red text.
(depending on the versions of Excel, the menus may vary)
When the person enters a duplicate value, the new cell containing the duplicate (and the existing cell) will be colored to indicate the cells containing duplicates, which should catch their attention and decrease the chances of errors :-)
Dal
P.S.: I am moving your question to the Programming - VBA forum in case someone wants to add to the answer with a code proposal.
I can see if someone in the office knows how to do that :)
In any case, I will submit the rest of your solution to a few people who are good with that spreadsheet and see if they can make good use of it.
The request is very specific, and there doesn't seem to be any off-the-shelf program that would allow for that kind of thing.
Thank you very much in any case :)
Hello, I have the same problem as Poctokom.
I have several HR services that manage personnel and have assigned trigrams to each employee.
These trigrams are usually made up of the first letter of the first name, followed by the first and last letter of the last name.
In case of a duplicate, the second to last letter of the last name is taken as the last character; in case of further duplicates, the third to last letter of the last name, and so on.
If all letters of the last name have been used, we move on to the first name...
ETC...
Do you know where I could find an algorithm in VBA of this type?