ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Generating Unique Sequential Numbers (https://www.excelbanter.com/excel-discussion-misc-queries/147592-generating-unique-sequential-numbers.html)

Emma Winskill

Generating Unique Sequential Numbers
 
I am trying to create a form which will generate a sequential number by
clicking on a command button - one of the example templates in excel seems to
do this by using a macro, but I have no idea how to do this - can anyone help?
--
Emma

steve_doc

Generating Unique Sequential Numbers
 
1 of many possible ways - without the use of macro's

Asumming
GUID is in Column A
User nput starts in Column B

Format Colum A as Custum 00 (setting below General on custonm Format tab)
+ add 0 to it
in Cell A1 type 01
in Cell A2 enter formula = IF(B2 = "","", A1+1)
Autofill down as far as needed.

Not if user leaves B blank and enters on C, A will show Blank

HTH

"Emma Winskill" wrote:

I am trying to create a form which will generate a sequential number by
clicking on a command button - one of the example templates in excel seems to
do this by using a macro, but I have no idea how to do this - can anyone help?
--
Emma


Emma Winskill

Generating Unique Sequential Numbers
 
Thanks Steve, but how to I utilise this formula on a command button? The
form I am creating is for use as a quotation so therefore is set up as a
template. So each time a new number is created it will be used as a quote
reference therefore will be unique to each file if you like.

thanks
--
Emma


"steve_doc" wrote:

1 of many possible ways - without the use of macro's

Asumming
GUID is in Column A
User nput starts in Column B

Format Colum A as Custum 00 (setting below General on custonm Format tab)
+ add 0 to it
in Cell A1 type 01
in Cell A2 enter formula = IF(B2 = "","", A1+1)
Autofill down as far as needed.

Not if user leaves B blank and enters on C, A will show Blank

HTH

"Emma Winskill" wrote:

I am trying to create a form which will generate a sequential number by
clicking on a command button - one of the example templates in excel seems to
do this by using a macro, but I have no idea how to do this - can anyone help?
--
Emma


Gord Dibben

Generating Unique Sequential Numbers
 
Emma

John McGimpsey show you how at this site.

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html


Gord Dibben MS Excel MVP

On Fri, 22 Jun 2007 09:30:00 -0700, Emma Winskill
wrote:

Thanks Steve, but how to I utilise this formula on a command button? The
form I am creating is for use as a quotation so therefore is set up as a
template. So each time a new number is created it will be used as a quote
reference therefore will be unique to each file if you like.

thanks




All times are GMT +1. The time now is 04:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com