Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
sld sld is offline
external usenet poster
 
Posts: 10
Default How to increase a number by 1 every time the spreadsheet opens?

Is there a way to have a number increase by 1 every time the excel
spreadsheet opens?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default How to increase a number by 1 every time the spreadsheet opens?

With a Workbook open even macro such as

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

Open the VBA editor, right click ThisWorkbook for the file in question and
use View Code
Paste this macro into the module

New to VBA? See

David McRitchie's site on "getting started" with VBA

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Debra Dalgleish's "Adding Code to a Workbook"

http://www.contextures.com:80/xlvba01.html

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"SLD" wrote in message
...
Is there a way to have a number increase by 1 every time the excel
spreadsheet opens?



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
how do i have a cell number increase by 1 each time file opened DJbase Excel Discussion (Misc queries) 1 May 25th 08 04:17 AM
Spreadsheet opens very slowly Rich W. Excel Discussion (Misc queries) 5 May 19th 08 07:36 PM
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
EXCEL to update a number each time worksheet opens. hotchickbiker Excel Discussion (Misc queries) 2 August 15th 06 02:14 AM
How to automtically increase a number every time a file is used falcp Excel Discussion (Misc queries) 1 January 16th 06 04:29 PM


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