Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jo_9865
 
Posts: n/a
Default Can you automatically insert next sequential number in an excel fo

Does anyone know of a way to automatically insert the next sequential
reference number into a form in excel.

I would like a Purchase Order number to be automatically generated so there
is no chance of the same number being used twice. Each purchase order is
currently created on separate excel workbooks and a number is currently
entered each time.

Has anyone got any ideas as to how to solve this or is there another way to
do this perhaps using Access?
  #2   Report Post  
Henry
 
Posts: n/a
Default

Jo_9865,

In an unused cell on the spreadsheet, put 1.
when you open your form, change a label's caption to the contents of this
cell.
(Don't use a textbox, use a label, as a label can't be overwritten
accidentally)

LblInvoiceNo.Caption = Range("Z99").Value

After you print and save your invoice, increment the invoice number.
Range("Z99").Value = Range("Z99").Value + 1

If you close the form and reopen it, the caption will now be the new value
of Invoice Number.
If you just clear the form, ready for the next invoice, then you'll have to
update the caption with

LblInvoiceNo.Caption = Range("Z99").Value

The value in Z99 will be saved when you close the workbook and will be ready
when you re-open it.

Henry


"jo_9865" wrote in message
...
Does anyone know of a way to automatically insert the next sequential
reference number into a form in excel.

I would like a Purchase Order number to be automatically generated so
there
is no chance of the same number being used twice. Each purchase order is
currently created on separate excel workbooks and a number is currently
entered each time.

Has anyone got any ideas as to how to solve this or is there another way
to
do this perhaps using Access?



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Take a look he

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


In article ,
"jo_9865" wrote:

Does anyone know of a way to automatically insert the next sequential
reference number into a form in excel.

I would like a Purchase Order number to be automatically generated so there
is no chance of the same number being used twice. Each purchase order is
currently created on separate excel workbooks and a number is currently
entered each time.

Has anyone got any ideas as to how to solve this or is there another way to
do this perhaps using Access?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Excel automatically insert current date in a cell? AdrianXing Excel Worksheet Functions 25 April 3rd 23 07:42 PM
how do i automatically insert the current author's name in a cell. Nolin Excel Worksheet Functions 1 April 8th 05 04:38 AM
Insert date automatically Rick Excel Discussion (Misc queries) 2 March 31st 05 11:49 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM


All times are GMT +1. The time now is 01:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"