# auto generate number in excel



## pfk (Apr 2, 2006)

Can someone tell me if there's a way to autogenerate a six digit, unique number in a cell each time an Excel spreadhseet is opened? 

PK


----------



## OBP (Mar 8, 2005)

The autogeneration is not a problem, do you want auto-incrementing as well?
Does it overwrite the data in the same cell each time?


----------



## pfk (Apr 2, 2006)

Hi OBP...

Yes, I would like it to autoincrement each time the spreadhseet is opened. Also, if possible, the first number I would like to use to start is 550000. 

In terms of overwriting, not sure what you mean. The file will likely be saved as a unique name with the number that was generated. The next time the template is opened, I want it to automatically open with a new (incremented by one) number. 

Let me know if I'm not explaining myself every well. 

Paul


----------



## Zack Barresse (Jul 25, 2004)

Hi there,

Take a look at this Knowledge Base entry at VBAX, it will give you an auto increment number every time the file is opened...

http://vbaexpress.com/kb/getarticle.php?kb_id=349

HTH


----------



## pfk (Apr 2, 2006)

Will give it a try


----------

