#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Date Formula

Is there a way to have a date automatically inserted the first time a
document is opened and then not again?
--
Ronnie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Date Formula

Automatically......only by code.

Manually, first time opened, select a cell and CTRL + ;

Workbook_Open code that runs only if a cell is blank.

Private Sub Workbook_Open()
With Sheets("Sheet1").Range("A1")
If .Value = "" Then
..Value = Format(Now, "mm/dd/yyyy hh:mm:ss")
End If
End With
End Sub

Of course the workbook has to be opened at least once in order to add the code
to Thisworkbook module and saved.

Next time opened, date added to A1 but not on subsequent openings.


Gord Dibben MS Excel MVP

On Wed, 30 Apr 2008 13:19:00 -0700, Ronnie
wrote:

Is there a way to have a date automatically inserted the first time a
document is opened and then not again?


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
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
Excel Formula to calulate number of days passed from date to date K. Mack Excel Discussion (Misc queries) 8 January 4th 07 11:27 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 PM


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