Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default increasing a cell value on each use

I want to have a rolling total on 1 cell...such as an invoice number, each
time I open a worksheet. Is there a way to do this?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default increasing a cell value on each use

I think I'd do this with a Workbook_Open event.

Copy this to the "ThisWorkbook" code module and modify as necessary.

Private Sub Workbook_Open()
On Error Resume Next
Set myws = Nothing
Set myws = Worksheets("Sheet1") 'Modify
'Alternatively
Set myws = Sheet1 'Uses worksheet codename instead
On Error GoTo 0
If Not myws Is Nothing Then
myws.Range("A1").Value = myws.Range("A1").Value + 1 '<~~~modify
End If


End Sub

HTH,
Barb Reinhardt


"dave" wrote:

I want to have a rolling total on 1 cell...such as an invoice number, each
time I open a worksheet. Is there a way to do this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default increasing a cell value on each use


You might want to give this site a look.

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

HTH
Regards,
Howard

"dave" wrote in message
...
I want to have a rolling total on 1 cell...such as an invoice number, each
time I open a worksheet. Is there a way to do this?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default increasing a cell value on each use

Yay!!!!

John's site is back in service.


Gord

On Fri, 27 Jul 2007 14:02:59 -0700, "L. Howard Kittle"
wrote:


You might want to give this site a look.

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

HTH
Regards,
Howard

"dave" wrote in message
...
I want to have a rolling total on 1 cell...such as an invoice number, each
time I open a worksheet. Is there a way to do this?



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
Increasing # of Characters to display from a cell eabdala Excel Discussion (Misc queries) 6 July 12th 07 01:34 AM
increasing a cell by 1 Debra Excel Worksheet Functions 3 October 6th 06 04:41 PM
how do I paste without EXCEL increasing the cell number ? cgs Excel Worksheet Functions 5 April 19th 06 12:29 AM
increasing and decreasing a value in a cell cwal Excel Worksheet Functions 6 April 14th 06 06:55 PM
How do I always insert last cell from a increasing array ? Radu Excel Worksheet Functions 1 November 2nd 05 11:07 PM


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