Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default how do i set up automatic number generating

i want to set up automatic next number generating for a purchase order spread
sheet
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default how do i set up automatic number generating

In principle it's simple but it would help if your provided more detail.

Specifically, where should Excel look for the last number. Is it in the open
or another workbook or a file.

"huwzee" wrote:

i want to set up automatic next number generating for a purchase order spread
sheet

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default how do i set up automatic number generating

Hi Mike

i need it to generate the next number in the sequence i.e. 001, 002, 003,
etc for each individual purchase order, it should look for the number from
the previous purchase order, i just want 1 specific cell on the spreadsheet
to do it.

thanks,
steve

"Mike" wrote:

In principle it's simple but it would help if your provided more detail.

Specifically, where should Excel look for the last number. Is it in the open
or another workbook or a file.

"huwzee" wrote:

i want to set up automatic next number generating for a purchase order spread
sheet

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default how do i set up automatic number generating

Ok, One approach.

paste this macro in the current PO workbook you are using

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)ponum = link to the cell where the PO number is stored
Workbooks.Add
Filename = "NextPOnumber" & ponum + 1
ActiveWorkbook.SaveAs Filename:=Filename
End Sub

Somewhere in the work I imagine you will have the PO number. Edit the line
ponum to point to the cell that contains this number.

The macro will run when you try to save your current bok and it will open a
new book and save it with the file name nextponumber# where # is one more
than the current book.

Was this helpful?
"huwzee" wrote:

i want to set up automatic next number generating for a purchase order spread
sheet

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default how do i set up automatic number generating

hi mike
ive set up the macro how do i link it to a specific cell

"Mike" wrote:

Ok, One approach.

paste this macro in the current PO workbook you are using

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)ponum = link to the cell where the PO number is stored
Workbooks.Add
Filename = "NextPOnumber" & ponum + 1
ActiveWorkbook.SaveAs Filename:=Filename
End Sub

Somewhere in the work I imagine you will have the PO number. Edit the line
ponum to point to the cell that contains this number.

The macro will run when you try to save your current bok and it will open a
new book and save it with the file name nextponumber# where # is one more
than the current book.

Was this helpful?
"huwzee" wrote:

i want to set up automatic next number generating for a purchase order spread
sheet



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default how do i set up automatic number generating

ponum = link to the cell where the PO number is stored

ponum= worksheets("Sheet1").cells(1,1).value

adjust to suit

"huwzee" wrote:

hi mike
ive set up the macro how do i link it to a specific cell

"Mike" wrote:

Ok, One approach.

paste this macro in the current PO workbook you are using

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)ponum = link to the cell where the PO number is stored
Workbooks.Add
Filename = "NextPOnumber" & ponum + 1
ActiveWorkbook.SaveAs Filename:=Filename
End Sub

Somewhere in the work I imagine you will have the PO number. Edit the line
ponum to point to the cell that contains this number.

The macro will run when you try to save your current bok and it will open a
new book and save it with the file name nextponumber# where # is one more
than the current book.

Was this helpful?
"huwzee" wrote:

i want to set up automatic next number generating for a purchase order spread
sheet

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
Automatic Quote Number Creator Nitza Excel Worksheet Functions 4 January 21st 07 06:41 AM
Generating an auto number JohannM Excel Worksheet Functions 1 September 4th 06 06:20 PM
Automatic number generation. BM Excel Discussion (Misc queries) 1 August 14th 06 02:38 PM
Automatic Number Creation Problem? Corp Excel Worksheet Functions 1 April 6th 05 06:19 AM
Can I disable this automatic number advance thing? Paul Excel Discussion (Misc queries) 3 January 11th 05 04:31 PM


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

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

About Us

"It's about Microsoft Excel"