ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automatically increasing a number by 1 (https://www.excelbanter.com/excel-discussion-misc-queries/106727-automatically-increasing-number-1-a.html)

Dave

Automatically increasing a number by 1
 
How can I get a number in a cell to automatically in crease by 1 when the
workbook is opened?

THanks

scottfoxall

Automatically increasing a number by 1
 
What Cell in which worksheet do you want the counter

"Dave" wrote:

How can I get a number in a cell to automatically in crease by 1 when the
workbook is opened?

THanks


scottfoxall

Automatically increasing a number by 1
 
See link
http://www.mrexcel.com/archive/VBA/19072.html


"Dave" wrote:

How can I get a number in a cell to automatically in crease by 1 when the
workbook is opened?

THanks


Gord Dibben

Automatically increasing a number by 1
 
Dave

Private Sub Workbook_Open()
With Sheets("Sheet1").Range("A1")
..Value = .Value + 1
End With
End Sub

Adjust sheet and range to suit.

Right-click on the Excel Icon left of "File" on the menubar.

Select "View Code".

Paste the above into that module.


Gord Dibben MS Excel MVP

On Wed, 23 Aug 2006 13:58:02 -0700, Dave wrote:

How can I get a number in a cell to automatically in crease by 1 when the
workbook is opened?

THanks




All times are GMT +1. The time now is 02:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com