Hi Grunta, The result will change every time you do an activity in excel like. typing in data, or inserting rows / columns etc. Best way to avoid it would be do copy -> paste - > special -> values on the cells / numbers which are used up.
Further to this, if you want that the data which is used up, should not come again then you can use following formula:- {=IF(randbetween(1000,9999)=(A1:F9),randbetween(1000,9999)-9,"n")} assuming you have the used up data in range A1: F9. Note: you need to modify the formula as per your needs -- DILIP KUMAR PANDEY MBA-HR,B COM(Hons.),BCA Mobile: +91 9810929744 dilipan...@gmail.com dilipan...@yahoo.com New Delhi - 110062 On Wed, Apr 29, 2009 at 4:51 AM, Grunta <grun...@gmail.com> wrote: > > Hello > > I would like a solution regard to excel formulas / VBA scripting. > > The purpose is to assist in generatating unique PIN numbers for users > on our phone system.. > > The numbers generated need to be a number between 1000 & 9999... > > The basic formula I have used (=RANDBETWEEN(1000,9999)) does it > initially, but if the formula gets extended or a row gets deleted the > numbers are regenerated.... > > The numbers need to remain how they are at the initial time of running > the formula.. > > Any ideas? – I guess there needs to be some fault tolerances involved, > but for the life of me I would know what they are.... > > Kind Regards, > > Grant > > > > --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---