I'm currently doing a project in excel but I'm having some problems finding a way to automatically create a unique reference number for each new order.

On this particular worksheet I currently have:

title(reference number) in cell A2
the unique reference number needs to be in cell B2
And then all other details associated with the customer and order are entered below.

Each new order then needs to be saved into another worksheet for future reference in case any changes need to be made to the order (I'm not sure if it is possible to do this or if it affects the formula or code that I need for the reference number)

I know that =RAND() can be used to generate a random number but I'm not sure if that would work because there could be a chance of having duplicate numbers if it doesn't remember all the other numbers used previously.

This is the first time I have done a project like this and so I don't know how to use code or very complex formulae, so if you are able to help if you could explain it in stages and where and how to enter the information that would be great