Forum Discussion
Create a Unique Code Generator with Excel
- Nov 28, 2019
LukeA79 Hi, Why does the identifier need to be random?
If it doesnt, just extract the numbers, find the max and add 1, and error out when you hit the max. Since you know the format allowed, theres no need to have a list of available numbers.
Alternatively,
Create vba code to pull all used names, extract the numbers into an array, sort ascending, loop 49998 times and quit when you find an unused number.
Let me know if you need any more help.
LukeA79 Hi, Why does the identifier need to be random?
If it doesnt, just extract the numbers, find the max and add 1, and error out when you hit the max. Since you know the format allowed, theres no need to have a list of available numbers.
Alternatively,
Create vba code to pull all used names, extract the numbers into an array, sort ascending, loop 49998 times and quit when you find an unused number.
Let me know if you need any more help.
- LukeA79Nov 29, 2019Copper Contributor
Thank you for proposing a solution, I realized it is way beyond my skills and I would need too much time to learn this from scratch (it is for my job, but I will ask the IT department to sort this out).
I will try with an Access Web APp published to SharePoint