|You have two functions in Excel that generate "random" numbers, look at:|
This function creates a random number >=0 but <1.
The number will change each time the worksheet recalculates,
This function produces a random whole number between two specified numbers.
and it will also change each time the worksheet recalculates.
That being said, you will also need some type of mechanism to check that the number has not already been used.
Even "random" numbers repeat on occasion.