Just to clarify a point, as unlikely as it is, the Random solution might generate 2 identical numbers over the lifetime of your template unless further VBA instructions are imposed. If you really want a unique random number, you'll need to keep track of all the random numbers generated at Open, and then generate a random number that you can confidently assign, once it is determined that such number does not exist in the population of previously generated random numbers (hence unique). The code is not complicated and it's all possible with VBA as Phantom points out, just more involved than the above macro, which is missing non-duplicate checking that would guarantee a true unique random number.