Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a formula in a date range to locate a specific date - ecel | Excel Discussion (Misc queries) | |||
Excel Formula to calulate number of days passed from date to date | Excel Discussion (Misc queries) | |||
Formula for determining if two date columns fall within specific date range | Excel Worksheet Functions | |||
Formula for determining if two date columns fall within specific date range | Excel Discussion (Misc queries) | |||
formula to calculate future date from date in cell plus days | Excel Worksheet Functions |