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? |
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? |
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? |
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? |
All times are GMT +1. The time now is 11:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com