![]() |
Auto generating number
Can anyone help a novice to add a field in an Excel workbook that auto
generates a number (starting with the first one I tell it to) and then auto generate the next consecutive # after maybe clicking on an update button that also would clear the form? Maybe Excell is not the way to go. Maybe Access or something? |
Auto generating number
hi,
are you using a form or template? one way is to put your number is a remote cell. say IV69536. few people i know accually use that cell. add a "new" button. If template and assuming invoice number is in A1'..... Range("A1").value = range("IV65536").value this will load your next number. If form..... tbInvoiceNumer.value = Range("IV65536").value then at the end of your update code add this.... Range("IV65536").value = Range("IV65536").value + 1 this will set your next number for the next "new". there are a number of way to do this. Assuming that you are updating a database, you could us vlookup to find the max invoice number and add one to it and stick it in A1. there other ways but maybe this will get you going or give you ideas. "Best way" is often a mater of opinion and/or situation. Regards FSt1 "RichN" wrote: Can anyone help a novice to add a field in an Excel workbook that auto generates a number (starting with the first one I tell it to) and then auto generate the next consecutive # after maybe clicking on an update button that also would clear the form? Maybe Excell is not the way to go. Maybe Access or something? |
All times are GMT +1. The time now is 06:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com