Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Natalie
 
Posts: n/a
Default How do I auto number cells in an Excel template?

I created a template for a purchase order in Excel. Everytime someone opens
the template, I would like one cell to be automatically numbered in a
sequential pattern. That way each time the template is used, it will have
it's own unique number that will be used to identify it. Does anyone know if
this is possible for Excel 2000?

Thanks!
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

You could add a 1 to Sheet1!A1 each time the workbook is
opened. Press ALT+F11, double-click the "ThisWorkbook"
module under ViewProject Explorer and paste in:

Sub Workbook_Open()
With Sheets("Sheet1").[A1]
.Value = .Value + 1
End With
ActiveWorkbook.Save
End Sub

--
HTH
Jason
Atlanta, GA


-----Original Message-----
I created a template for a purchase order in Excel.

Everytime someone opens
the template, I would like one cell to be automatically

numbered in a
sequential pattern. That way each time the template is

used, it will have
it's own unique number that will be used to identify

it. Does anyone know if
this is possible for Excel 2000?

Thanks!
.

  #3   Report Post  
Natalie
 
Posts: n/a
Default

Hello,

Your suggestion didn't work for me. Can you help me figure out if I did
something wrong? I did all the steps as you suggested, closed MS visual
basic and returned to excel. When I reopened the file, it said that there
was an error and would I like to debug. When I said yes, it took me to
visual basic and highlighted the line:
With sheets("Sheet1").[A1]

Thinking that the problem is that I want to auto number cell A2, not A1, I
changed the cell number and saved. This kept me from having messages saying
I need to debug, but didn't make the spreadsheet automatically number itself
each time it is opened.

Thanks for any help you can offer!

Natalie

"Jason Morin" wrote:

You could add a 1 to Sheet1!A1 each time the workbook is
opened. Press ALT+F11, double-click the "ThisWorkbook"
module under ViewProject Explorer and paste in:

Sub Workbook_Open()
With Sheets("Sheet1").[A1]
.Value = .Value + 1
End With
ActiveWorkbook.Save
End Sub

--
HTH
Jason
Atlanta, GA


-----Original Message-----
I created a template for a purchase order in Excel.

Everytime someone opens
the template, I would like one cell to be automatically

numbered in a
sequential pattern. That way each time the template is

used, it will have
it's own unique number that will be used to identify

it. Does anyone know if
this is possible for Excel 2000?

Thanks!
.


  #4   Report Post  
Paul B
 
Posts: n/a
Default

Natalie, you said you are using a template, .xlt and not a .xls file, if
that is the case you will need to use something like the examples here

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

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Natalie" wrote in message
...
Hello,

Your suggestion didn't work for me. Can you help me figure out if I did
something wrong? I did all the steps as you suggested, closed MS visual
basic and returned to excel. When I reopened the file, it said that there
was an error and would I like to debug. When I said yes, it took me to
visual basic and highlighted the line:
With sheets("Sheet1").[A1]

Thinking that the problem is that I want to auto number cell A2, not A1, I
changed the cell number and saved. This kept me from having messages

saying
I need to debug, but didn't make the spreadsheet automatically number

itself
each time it is opened.

Thanks for any help you can offer!

Natalie

"Jason Morin" wrote:

You could add a 1 to Sheet1!A1 each time the workbook is
opened. Press ALT+F11, double-click the "ThisWorkbook"
module under ViewProject Explorer and paste in:

Sub Workbook_Open()
With Sheets("Sheet1").[A1]
.Value = .Value + 1
End With
ActiveWorkbook.Save
End Sub

--
HTH
Jason
Atlanta, GA


-----Original Message-----
I created a template for a purchase order in Excel.

Everytime someone opens
the template, I would like one cell to be automatically

numbered in a
sequential pattern. That way each time the template is

used, it will have
it's own unique number that will be used to identify

it. Does anyone know if
this is possible for Excel 2000?

Thanks!
.




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
Merging data from an excel worksheet into an excel template pkasler Excel Worksheet Functions 1 March 13th 05 04:36 AM
how to set up a column in excel so it can auto number Excel questions Excel Discussion (Misc queries) 2 March 10th 05 08:35 AM
Email template from excel rlbriley Excel Discussion (Misc queries) 1 March 9th 05 10:16 AM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


All times are GMT +1. The time now is 02:18 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"